Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(devtools): sync e2e #16120

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old DT test runner has been removed

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
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
Loading