Skip to content

Commit 268fcdb

Browse files
authored
tests(devtools): sync e2e (#16253)
1 parent fc50e70 commit 268fcdb

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

third-party/devtools-tests/e2e/lighthouse/navigation_test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
waitFor,
1414
waitForElementWithTextContent,
1515
} from '../../shared/helper.js';
16-
1716
import {
1817
clickStartButton,
1918
getAuditsBreakdown,

third-party/devtools-tests/e2e/lighthouse/start-view_test.ts

+13-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
import {assert} from 'chai';
66

77
import {goTo, goToResource, waitFor} from '../../shared/helper.js';
8-
98
import {
109
clearSiteData,
1110
getHelpText,
1211
isGenerateReportButtonDisabled,
1312
navigateToLighthouseTab,
1413
selectCategories,
14+
selectMode,
1515
waitForStorageUsage,
1616
} from '../helpers/lighthouse-helpers.js';
1717

@@ -47,7 +47,7 @@ describe('The Lighthouse start view', () => {
4747
assert.strictEqual(helpText, '');
4848
});
4949

50-
it('disables the start button for internal pages', async () => {
50+
it('disables the start button for internal pages in navigation mode', async () => {
5151
await navigateToLighthouseTab();
5252
await goTo('about:blank');
5353

@@ -57,6 +57,17 @@ describe('The Lighthouse start view', () => {
5757
assert.strictEqual(helpText, 'Can only audit pages on HTTP or HTTPS. Navigate to a different page.');
5858
});
5959

60+
it('disables the start button for internal pages in non-navigation mode', async () => {
61+
await navigateToLighthouseTab();
62+
await goTo('about:blank');
63+
await selectMode('timespan');
64+
65+
const disabled = await isGenerateReportButtonDisabled();
66+
const helpText = await getHelpText();
67+
assert.isFalse(disabled, 'The Generate Report button should be enabled');
68+
assert.strictEqual(helpText, '');
69+
});
70+
6071
// Broken on non-debug runs
6172
it.skip('[crbug.com/1057948] shows generate report button even when navigating to an unreachable page', async () => {
6273
await navigateToLighthouseTab('empty.html');

0 commit comments

Comments
 (0)