Skip to content

Commit f391726

Browse files
committed
test(ui): Remove percy from e2e testing stack
Percy has no way to capture shadow DOM and it's not worth complicating the code for the forseeable future. See #934 for more info.
1 parent e6a6e7a commit f391726

File tree

6 files changed

+13559
-13789
lines changed

6 files changed

+13559
-13789
lines changed

.github/workflows/presubmit.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ jobs:
3636
- run: npm ci
3737
- name: Lint, build, and test
3838
id: run-tests
39-
run: npm run presubmit:percy
40-
env:
41-
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
39+
run: npm run presubmit:coverage
4240
- name: Check for screenshot failures
4341
id: check-screenshots
4442
if: failure()

extension/test/e2e_visual_test.ts

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
import { Config } from '../configuration';
22
import { TestOnlyRcxContent } from '../rikaicontent';
3-
import {
4-
executeServerCommand,
5-
resetMouse,
6-
sendKeys,
7-
sendMouse,
8-
} from '@web/test-runner-commands';
3+
import { resetMouse, sendKeys, sendMouse } from '@web/test-runner-commands';
94
import { use } from '@esm-bundle/chai';
105
import { visualDiff } from '@web/test-runner-visual-regression';
11-
import sinonChrome from 'sinon-chrome';
12-
// eslint-disable-next-line import/no-unresolved
13-
import env from './environment.js';
146
import sinon from 'sinon';
157
import sinonChai from 'sinon-chai';
8+
import sinonChrome from 'sinon-chrome';
169

1710
use(sinonChai);
18-
console.log('Running tests with percy enabled:', env.percyEnabled);
1911

2012
// Extract callback types from chrome listeners.
2113
type StorageOnChangedHandler = Parameters<
@@ -247,11 +239,6 @@ function configureMessagePassing() {
247239
}
248240

249241
async function takeSnapshot(name: string) {
250-
if (env.percyEnabled) {
251-
await executeServerCommand('takePercySnapshot', {
252-
name: name,
253-
});
254-
}
255242
await visualDiff(
256243
document
257244
.querySelector<HTMLDivElement>('#rikaichan-window')!

extension/test/test-augments.d.ts

-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
11
// Allows loading module again to test no head element.
22
declare module '*?no-head' {}
3-
4-
// Type info for dynamic module provided by web test-runner
5-
// plugin.
6-
declare module '*environment.js' {
7-
const env: {
8-
percyEnabled: boolean;
9-
};
10-
11-
export default env;
12-
}

0 commit comments

Comments
 (0)