diff --git a/third-party/devtools-tests/e2e/lighthouse/navigation_test.ts b/third-party/devtools-tests/e2e/lighthouse/navigation_test.ts index aff7293db901..177c0a5bfc87 100644 --- a/third-party/devtools-tests/e2e/lighthouse/navigation_test.ts +++ b/third-party/devtools-tests/e2e/lighthouse/navigation_test.ts @@ -13,7 +13,6 @@ import { waitFor, waitForElementWithTextContent, } from '../../shared/helper.js'; - import { clickStartButton, getAuditsBreakdown, diff --git a/third-party/devtools-tests/e2e/lighthouse/start-view_test.ts b/third-party/devtools-tests/e2e/lighthouse/start-view_test.ts index 6b30fd3aaec3..5fcc52358abd 100644 --- a/third-party/devtools-tests/e2e/lighthouse/start-view_test.ts +++ b/third-party/devtools-tests/e2e/lighthouse/start-view_test.ts @@ -5,13 +5,13 @@ import {assert} from 'chai'; import {goTo, goToResource, waitFor} from '../../shared/helper.js'; - import { clearSiteData, getHelpText, isGenerateReportButtonDisabled, navigateToLighthouseTab, selectCategories, + selectMode, waitForStorageUsage, } from '../helpers/lighthouse-helpers.js'; @@ -47,7 +47,7 @@ describe('The Lighthouse start view', () => { assert.strictEqual(helpText, ''); }); - it('disables the start button for internal pages', async () => { + it('disables the start button for internal pages in navigation mode', async () => { await navigateToLighthouseTab(); await goTo('about:blank'); @@ -57,6 +57,17 @@ describe('The Lighthouse start view', () => { assert.strictEqual(helpText, 'Can only audit pages on HTTP or HTTPS. Navigate to a different page.'); }); + it('disables the start button for internal pages in non-navigation mode', async () => { + await navigateToLighthouseTab(); + await goTo('about:blank'); + await selectMode('timespan'); + + const disabled = await isGenerateReportButtonDisabled(); + const helpText = await getHelpText(); + assert.isFalse(disabled, 'The Generate Report button should be enabled'); + assert.strictEqual(helpText, ''); + }); + // Broken on non-debug runs it.skip('[crbug.com/1057948] shows generate report button even when navigating to an unreachable page', async () => { await navigateToLighthouseTab('empty.html');