From 151e1fa3e869880f893a3bbb3b6db4ceebc79f07 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Thu, 20 Jul 2023 12:42:39 -0700 Subject: [PATCH] misc: rename `fraggle-rock` fixtures to `user-flows` --- .gitignore | 4 ++-- build/build-sample-reports.js | 2 +- core/scripts/assert-baseline-flow-result-unchanged.sh | 2 +- core/scripts/build-test-flow-report.js | 2 +- core/scripts/update-flow-fixtures.js | 4 ++-- .../{fraggle-rock => user-flows}/artifacts/options.json | 0 .../artifacts/step0/artifacts.json | 0 .../artifacts/step0/defaultPass.devtoolslog.json | 0 .../artifacts/step0/defaultPass.trace.json | 0 .../artifacts/step0/options.json | 0 .../artifacts/step1/artifacts.json | 0 .../artifacts/step1/defaultPass.devtoolslog.json | 0 .../artifacts/step1/defaultPass.trace.json | 0 .../artifacts/step1/options.json | 0 .../artifacts/step2/artifacts.json | 0 .../artifacts/step2/options.json | 0 .../artifacts/step3/artifacts.json | 0 .../artifacts/step3/defaultPass.devtoolslog.json | 0 .../artifacts/step3/defaultPass.trace.json | 0 .../artifacts/step3/options.json | 0 .../{fraggle-rock => user-flows}/css-change/end.css | 0 .../{fraggle-rock => user-flows}/css-change/end.html | 0 .../{fraggle-rock => user-flows}/css-change/start.css | 0 .../{fraggle-rock => user-flows}/css-change/start.html | 0 .../navigation-basic/index.html | 0 .../navigation-basic/links-to-index.html | 0 .../replay/desktop-test-flow.json | 0 .../replay/mobile-test-flow.json | 0 .../reports/sample-flow-result.json | 0 .../snapshot-basic/onclick.html | 0 core/test/lib/asset-saver-test.js | 6 +++--- core/test/scenarios/api-test-pptr.js | 6 +++--- core/test/scenarios/disconnect-test-pptr.js | 2 +- core/test/scenarios/start-end-navigation-test-pptr.js | 2 +- flow-report/test/sample-flow.ts | 2 +- report/test/generator/report-generator-test.js | 2 +- viewer/test/viewer-test-pptr.js | 2 +- 37 files changed, 18 insertions(+), 18 deletions(-) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/options.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step0/artifacts.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step0/defaultPass.devtoolslog.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step0/defaultPass.trace.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step0/options.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step1/artifacts.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step1/defaultPass.devtoolslog.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step1/defaultPass.trace.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step1/options.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step2/artifacts.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step2/options.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step3/artifacts.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step3/defaultPass.devtoolslog.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step3/defaultPass.trace.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/artifacts/step3/options.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/css-change/end.css (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/css-change/end.html (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/css-change/start.css (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/css-change/start.html (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/navigation-basic/index.html (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/navigation-basic/links-to-index.html (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/replay/desktop-test-flow.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/replay/mobile-test-flow.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/reports/sample-flow-result.json (100%) rename core/test/fixtures/{fraggle-rock => user-flows}/snapshot-basic/onclick.html (100%) diff --git a/.gitignore b/.gitignore index 71741460c260..106a0b9c3528 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,8 @@ last-run-results.html !core/test/results/artifacts/*.devtoolslog.json !core/test/fixtures/artifacts/**/*.trace.json !core/test/fixtures/artifacts/**/*.devtoolslog.json -!core/test/fixtures/fraggle-rock/**/*.trace.json -!core/test/fixtures/fraggle-rock/**/*.devtoolslog.json +!core/test/fixtures/user-flows/**/*.trace.json +!core/test/fixtures/user-flows/**/*.devtoolslog.json !core/test/fixtures/traces/**/*.trace.json !core/test/fixtures/traces/**/*.devtoolslog.json !core/test/fixtures/config/**/node_modules diff --git a/build/build-sample-reports.js b/build/build-sample-reports.js index f96b75854476..f2041a27f6a5 100644 --- a/build/build-sample-reports.js +++ b/build/build-sample-reports.js @@ -23,7 +23,7 @@ const lhr = readJson(`${LH_ROOT}/core/test/results/sample_v2.json`); /** @type {LH.FlowResult} */ const flowResult = readJson( - `${LH_ROOT}/core/test/fixtures/fraggle-rock/reports/sample-flow-result.json` + `${LH_ROOT}/core/test/fixtures/user-flows/reports/sample-flow-result.json` ); const DIST = path.join(LH_ROOT, 'dist'); diff --git a/core/scripts/assert-baseline-flow-result-unchanged.sh b/core/scripts/assert-baseline-flow-result-unchanged.sh index 5c9bbd97e576..dec2c5194bd7 100644 --- a/core/scripts/assert-baseline-flow-result-unchanged.sh +++ b/core/scripts/assert-baseline-flow-result-unchanged.sh @@ -10,7 +10,7 @@ set -e PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" LH_ROOT="$PWD/../.." -BASELINE_RESULT_PATH="$LH_ROOT/core/test/fixtures/fraggle-rock/reports/sample-flow-result.json" +BASELINE_RESULT_PATH="$LH_ROOT/core/test/fixtures/user-flows/reports/sample-flow-result.json" TMP_PATH="$LH_ROOT/.tmp" FRESH_RESULT_PATH="$TMP_PATH/fresh_flow_result.json" diff --git a/core/scripts/build-test-flow-report.js b/core/scripts/build-test-flow-report.js index f88a669682b3..b2c1ed7e06a3 100644 --- a/core/scripts/build-test-flow-report.js +++ b/core/scripts/build-test-flow-report.js @@ -14,7 +14,7 @@ import {ReportGenerator} from '../../report/generator/report-generator.js'; import {LH_ROOT} from '../../root.js'; import {readJson} from '../test/test-utils.js'; -const flow = readJson('core/test/fixtures/fraggle-rock/reports/sample-flow-result.json'); +const flow = readJson('core/test/fixtures/user-flows/reports/sample-flow-result.json'); const htmlReport = ReportGenerator.generateFlowReportHtml(flow); const filepath = `${LH_ROOT}/dist/sample-reports/flow-report/index.html`; fs.writeFileSync(filepath, htmlReport); diff --git a/core/scripts/update-flow-fixtures.js b/core/scripts/update-flow-fixtures.js index 44d01a72eca3..905461463164 100644 --- a/core/scripts/update-flow-fixtures.js +++ b/core/scripts/update-flow-fixtures.js @@ -21,8 +21,8 @@ import * as api from '../index.js'; import * as assetSaver from '../lib/asset-saver.js'; /* eslint-disable max-len */ -const ARTIFACTS_PATH = `${LH_ROOT}/core/test/fixtures/fraggle-rock/artifacts/`; -const FLOW_RESULT_PATH = `${LH_ROOT}/core/test/fixtures/fraggle-rock/reports/sample-flow-result.json`; +const ARTIFACTS_PATH = `${LH_ROOT}/core/test/fixtures/user-flows/artifacts/`; +const FLOW_RESULT_PATH = `${LH_ROOT}/core/test/fixtures/user-flows/reports/sample-flow-result.json`; const FLOW_REPORT_PATH = `${LH_ROOT}/dist/sample-reports/flow-report/index.html`; /* eslint-enable max-len */ diff --git a/core/test/fixtures/fraggle-rock/artifacts/options.json b/core/test/fixtures/user-flows/artifacts/options.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/options.json rename to core/test/fixtures/user-flows/artifacts/options.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step0/artifacts.json b/core/test/fixtures/user-flows/artifacts/step0/artifacts.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step0/artifacts.json rename to core/test/fixtures/user-flows/artifacts/step0/artifacts.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step0/defaultPass.devtoolslog.json b/core/test/fixtures/user-flows/artifacts/step0/defaultPass.devtoolslog.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step0/defaultPass.devtoolslog.json rename to core/test/fixtures/user-flows/artifacts/step0/defaultPass.devtoolslog.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step0/defaultPass.trace.json b/core/test/fixtures/user-flows/artifacts/step0/defaultPass.trace.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step0/defaultPass.trace.json rename to core/test/fixtures/user-flows/artifacts/step0/defaultPass.trace.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step0/options.json b/core/test/fixtures/user-flows/artifacts/step0/options.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step0/options.json rename to core/test/fixtures/user-flows/artifacts/step0/options.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step1/artifacts.json b/core/test/fixtures/user-flows/artifacts/step1/artifacts.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step1/artifacts.json rename to core/test/fixtures/user-flows/artifacts/step1/artifacts.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step1/defaultPass.devtoolslog.json b/core/test/fixtures/user-flows/artifacts/step1/defaultPass.devtoolslog.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step1/defaultPass.devtoolslog.json rename to core/test/fixtures/user-flows/artifacts/step1/defaultPass.devtoolslog.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step1/defaultPass.trace.json b/core/test/fixtures/user-flows/artifacts/step1/defaultPass.trace.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step1/defaultPass.trace.json rename to core/test/fixtures/user-flows/artifacts/step1/defaultPass.trace.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step1/options.json b/core/test/fixtures/user-flows/artifacts/step1/options.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step1/options.json rename to core/test/fixtures/user-flows/artifacts/step1/options.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step2/artifacts.json b/core/test/fixtures/user-flows/artifacts/step2/artifacts.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step2/artifacts.json rename to core/test/fixtures/user-flows/artifacts/step2/artifacts.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step2/options.json b/core/test/fixtures/user-flows/artifacts/step2/options.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step2/options.json rename to core/test/fixtures/user-flows/artifacts/step2/options.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step3/artifacts.json b/core/test/fixtures/user-flows/artifacts/step3/artifacts.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step3/artifacts.json rename to core/test/fixtures/user-flows/artifacts/step3/artifacts.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step3/defaultPass.devtoolslog.json b/core/test/fixtures/user-flows/artifacts/step3/defaultPass.devtoolslog.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step3/defaultPass.devtoolslog.json rename to core/test/fixtures/user-flows/artifacts/step3/defaultPass.devtoolslog.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step3/defaultPass.trace.json b/core/test/fixtures/user-flows/artifacts/step3/defaultPass.trace.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step3/defaultPass.trace.json rename to core/test/fixtures/user-flows/artifacts/step3/defaultPass.trace.json diff --git a/core/test/fixtures/fraggle-rock/artifacts/step3/options.json b/core/test/fixtures/user-flows/artifacts/step3/options.json similarity index 100% rename from core/test/fixtures/fraggle-rock/artifacts/step3/options.json rename to core/test/fixtures/user-flows/artifacts/step3/options.json diff --git a/core/test/fixtures/fraggle-rock/css-change/end.css b/core/test/fixtures/user-flows/css-change/end.css similarity index 100% rename from core/test/fixtures/fraggle-rock/css-change/end.css rename to core/test/fixtures/user-flows/css-change/end.css diff --git a/core/test/fixtures/fraggle-rock/css-change/end.html b/core/test/fixtures/user-flows/css-change/end.html similarity index 100% rename from core/test/fixtures/fraggle-rock/css-change/end.html rename to core/test/fixtures/user-flows/css-change/end.html diff --git a/core/test/fixtures/fraggle-rock/css-change/start.css b/core/test/fixtures/user-flows/css-change/start.css similarity index 100% rename from core/test/fixtures/fraggle-rock/css-change/start.css rename to core/test/fixtures/user-flows/css-change/start.css diff --git a/core/test/fixtures/fraggle-rock/css-change/start.html b/core/test/fixtures/user-flows/css-change/start.html similarity index 100% rename from core/test/fixtures/fraggle-rock/css-change/start.html rename to core/test/fixtures/user-flows/css-change/start.html diff --git a/core/test/fixtures/fraggle-rock/navigation-basic/index.html b/core/test/fixtures/user-flows/navigation-basic/index.html similarity index 100% rename from core/test/fixtures/fraggle-rock/navigation-basic/index.html rename to core/test/fixtures/user-flows/navigation-basic/index.html diff --git a/core/test/fixtures/fraggle-rock/navigation-basic/links-to-index.html b/core/test/fixtures/user-flows/navigation-basic/links-to-index.html similarity index 100% rename from core/test/fixtures/fraggle-rock/navigation-basic/links-to-index.html rename to core/test/fixtures/user-flows/navigation-basic/links-to-index.html diff --git a/core/test/fixtures/fraggle-rock/replay/desktop-test-flow.json b/core/test/fixtures/user-flows/replay/desktop-test-flow.json similarity index 100% rename from core/test/fixtures/fraggle-rock/replay/desktop-test-flow.json rename to core/test/fixtures/user-flows/replay/desktop-test-flow.json diff --git a/core/test/fixtures/fraggle-rock/replay/mobile-test-flow.json b/core/test/fixtures/user-flows/replay/mobile-test-flow.json similarity index 100% rename from core/test/fixtures/fraggle-rock/replay/mobile-test-flow.json rename to core/test/fixtures/user-flows/replay/mobile-test-flow.json diff --git a/core/test/fixtures/fraggle-rock/reports/sample-flow-result.json b/core/test/fixtures/user-flows/reports/sample-flow-result.json similarity index 100% rename from core/test/fixtures/fraggle-rock/reports/sample-flow-result.json rename to core/test/fixtures/user-flows/reports/sample-flow-result.json diff --git a/core/test/fixtures/fraggle-rock/snapshot-basic/onclick.html b/core/test/fixtures/user-flows/snapshot-basic/onclick.html similarity index 100% rename from core/test/fixtures/fraggle-rock/snapshot-basic/onclick.html rename to core/test/fixtures/user-flows/snapshot-basic/onclick.html diff --git a/core/test/lib/asset-saver-test.js b/core/test/lib/asset-saver-test.js index 96cdda27d34a..2a2321a88aa9 100644 --- a/core/test/lib/asset-saver-test.js +++ b/core/test/lib/asset-saver-test.js @@ -237,7 +237,7 @@ describe('asset-saver helper', () => { describe('loadFlowArtifacts', () => { it('loads flow artifacts from disk', async () => { - const artifactsPath = moduleDir + '/../fixtures/fraggle-rock/artifacts/'; + const artifactsPath = moduleDir + '/../fixtures/user-flows/artifacts/'; const flowArtifacts = await assetSaver.loadFlowArtifacts(artifactsPath); expect(flowArtifacts.gatherSteps.map(gatherStep => gatherStep.flags)).toEqual([ @@ -290,7 +290,7 @@ describe('asset-saver helper', () => { }); it('round trips saved flow artifacts', async () => { - const flowArtifactsPath = moduleDir + '/../fixtures/fraggle-rock/artifacts/'; + const flowArtifactsPath = moduleDir + '/../fixtures/user-flows/artifacts/'; const originalArtifacts = await assetSaver.loadFlowArtifacts(flowArtifactsPath); await assetSaver.saveFlowArtifacts(originalArtifacts, outputPath); @@ -333,7 +333,7 @@ describe('asset-saver helper', () => { const existingDevtoolslogPath = `${step0Path}/bestPass.devtoolslog.json`; fs.writeFileSync(existingDevtoolslogPath, '[]'); - const artifactsPath = moduleDir + '/../fixtures/fraggle-rock/artifacts'; + const artifactsPath = moduleDir + '/../fixtures/user-flows/artifacts'; const originalArtifacts = await assetSaver.loadFlowArtifacts(artifactsPath); await assetSaver.saveFlowArtifacts(originalArtifacts, outputPath); diff --git a/core/test/scenarios/api-test-pptr.js b/core/test/scenarios/api-test-pptr.js index dd7c990ed340..05ee289ec985 100644 --- a/core/test/scenarios/api-test-pptr.js +++ b/core/test/scenarios/api-test-pptr.js @@ -31,7 +31,7 @@ describe('Fraggle Rock API', function() { describe('snapshot', () => { beforeEach(() => { const {server} = state; - server.baseDir = `${LH_ROOT}/core/test/fixtures/fraggle-rock/snapshot-basic`; + server.baseDir = `${LH_ROOT}/core/test/fixtures/user-flows/snapshot-basic`; }); it('should compute accessibility results on the page as-is', async () => { @@ -60,7 +60,7 @@ describe('Fraggle Rock API', function() { describe('startTimespan', () => { beforeEach(() => { const {server} = state; - server.baseDir = `${LH_ROOT}/core/test/fixtures/fraggle-rock/snapshot-basic`; + server.baseDir = `${LH_ROOT}/core/test/fixtures/user-flows/snapshot-basic`; }); it('should compute ConsoleMessage results across a span of time', async () => { @@ -212,7 +212,7 @@ Array [ describe('navigation', () => { beforeEach(() => { const {server} = state; - server.baseDir = `${LH_ROOT}/core/test/fixtures/fraggle-rock/navigation-basic`; + server.baseDir = `${LH_ROOT}/core/test/fixtures/user-flows/navigation-basic`; }); it('should compute both snapshot & timespan results', async () => { diff --git a/core/test/scenarios/disconnect-test-pptr.js b/core/test/scenarios/disconnect-test-pptr.js index d6d9411625fb..4d15381438c2 100644 --- a/core/test/scenarios/disconnect-test-pptr.js +++ b/core/test/scenarios/disconnect-test-pptr.js @@ -19,7 +19,7 @@ describe('Disconnect', function() { state.installSetupAndTeardownHooks(); before(() => { - state.server.baseDir = `${LH_ROOT}/core/test/fixtures/fraggle-rock/snapshot-basic`; + state.server.baseDir = `${LH_ROOT}/core/test/fixtures/user-flows/snapshot-basic`; }); it('should reset the listeners/protocol when LH is done', async () => { diff --git a/core/test/scenarios/start-end-navigation-test-pptr.js b/core/test/scenarios/start-end-navigation-test-pptr.js index 542ddbe84528..294489bf5a9a 100644 --- a/core/test/scenarios/start-end-navigation-test-pptr.js +++ b/core/test/scenarios/start-end-navigation-test-pptr.js @@ -19,7 +19,7 @@ describe('Start/End navigation', function() { state.installSetupAndTeardownHooks(); before(() => { - state.server.baseDir = `${LH_ROOT}/core/test/fixtures/fraggle-rock/navigation-basic`; + state.server.baseDir = `${LH_ROOT}/core/test/fixtures/user-flows/navigation-basic`; }); it('should capture a navigation via user interaction', async () => { diff --git a/flow-report/test/sample-flow.ts b/flow-report/test/sample-flow.ts index 7fae1376a234..d647fbb67d4a 100644 --- a/flow-report/test/sample-flow.ts +++ b/flow-report/test/sample-flow.ts @@ -11,7 +11,7 @@ import {fileURLToPath} from 'url'; export const flowResult: LH.FlowResult = JSON.parse( fs.readFileSync( // eslint-disable-next-line max-len - `${dirname(fileURLToPath(import.meta.url))}/../../core/test/fixtures/fraggle-rock/reports/sample-flow-result.json`, + `${dirname(fileURLToPath(import.meta.url))}/../../core/test/fixtures/user-flows/reports/sample-flow-result.json`, 'utf-8' ) ); diff --git a/report/test/generator/report-generator-test.js b/report/test/generator/report-generator-test.js index 9d3f67231d00..e6427767ec07 100644 --- a/report/test/generator/report-generator-test.js +++ b/report/test/generator/report-generator-test.js @@ -16,7 +16,7 @@ import {ReportGenerator} from '../../generator/report-generator.js'; import {readJson} from '../../../core/test/test-utils.js'; const sampleResults = readJson('core/test/results/sample_v2.json'); -const sampleFlowResult = readJson('core/test/fixtures/fraggle-rock/reports/sample-flow-result.json'); +const sampleFlowResult = readJson('core/test/fixtures/user-flows/reports/sample-flow-result.json'); describe('ReportGenerator', () => { describe('#replaceStrings', () => { diff --git a/viewer/test/viewer-test-pptr.js b/viewer/test/viewer-test-pptr.js index 3b6097b40e44..2d57a9ba0094 100644 --- a/viewer/test/viewer-test-pptr.js +++ b/viewer/test/viewer-test-pptr.js @@ -23,7 +23,7 @@ const portNumber = 10200; const viewerUrl = `http://localhost:${portNumber}/dist/gh-pages/viewer/index.html`; const sampleLhr = LH_ROOT + '/core/test/results/sample_v2.json'; // eslint-disable-next-line max-len -const sampleFlowResult = LH_ROOT + '/core/test/fixtures/fraggle-rock/reports/sample-flow-result.json'; +const sampleFlowResult = LH_ROOT + '/core/test/fixtures/user-flows/reports/sample-flow-result.json'; const lighthouseCategories = Object.keys(defaultConfig.categories); const getAuditsOfCategory = category => defaultConfig.categories[category].auditRefs;