Skip to content

Commit

Permalink
tests(devtools): sync e2e (#16120)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine authored Jul 17, 2024
1 parent a21fde7 commit 8715744
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions core/test/devtools-tests/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export LH_ROOT="$SCRIPT_DIR/../../.."

cd "$DEVTOOLS_PATH"

TEST_PATTERN="${1:-lighthouse/*}"
vpython3 third_party/node/node.py --output scripts/test/run_test_suite.js --config=test/e2e/test-runner-config.json "$TEST_PATTERN" --target=$BUILD_FOLDER
TEST_PATTERN="${1:-test/e2e/lighthouse/*}"
vpython3 third_party/node/node.py --output scripts/run_on_target.mjs gen/test/run.js "$TEST_PATTERN" --target=$BUILD_FOLDER
12 changes: 6 additions & 6 deletions third-party/devtools-tests/e2e/lighthouse/navigation_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,8 @@ describe('Navigation', function() {
await navigateToLighthouseTab('lighthouse/hello.html');
await registerServiceWorker();

await selectCategories([
'performance',
'accessibility',
'best-practices',
'seo',
]);
await waitFor('.lighthouse-start-view');
// We don't call selectCategories explicitly, but it's implied we leave all the checkboxes checked

let numNavigations = 0;
const {target} = getBrowserAndPages();
Expand All @@ -89,6 +85,10 @@ describe('Navigation', function() {

const {lhr, artifacts, reportEl} = await waitForResult();

const receivedCategories = Array.from(Object.keys(lhr.categories)).sort();
const sentCategories = Array.from(lhr.configSettings.onlyCategories).sort();
assert.deepStrictEqual(receivedCategories, sentCategories);

// 1 initial about:blank jump
// 1 navigation for the actual page load
// 2 navigations to go to chrome://terms and back testing bfcache
Expand Down
8 changes: 4 additions & 4 deletions third-party/devtools-tests/e2e/lighthouse/start-view_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ describe('The Lighthouse start view', () => {
assert.strictEqual(helpText, '');
});

// Flaky test.
it.skipOnPlatforms(['mac'], '[crbug.com/1484942]: disables the start button for internal pages', async () => {
it('disables the start button for internal pages', async () => {
await navigateToLighthouseTab();
await goTo('about:blank');

Expand All @@ -67,8 +66,9 @@ describe('The Lighthouse start view', () => {
assert.isTrue(disabled, 'The Generate Report button should be disabled');
});

it('displays warning if important data may affect performance', async () => {
// e2e tests in application/ create websql and indexeddb items and don't clean up after themselves
// Broken in local builds and stressor jobs
it.skip('[crbug.com/347114248] displays warning if important data may affect performance', async () => {
// e2e tests in application/ create indexeddb items and don't clean up after themselves
await clearSiteData();

await navigateToLighthouseTab('empty.html');
Expand Down

0 comments on commit 8715744

Please sign in to comment.