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

misc: rename fraggle-rock fixtures directory to user-flows #15291

Merged
merged 1 commit into from
Jul 20, 2023
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/build-sample-reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/assert-baseline-flow-result-unchanged.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion core/scripts/build-test-flow-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/update-flow-fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
6 changes: 3 additions & 3 deletions core/test/lib/asset-saver-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions core/test/scenarios/api-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion core/test/scenarios/disconnect-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion core/test/scenarios/start-end-navigation-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion flow-report/test/sample-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)
);
2 changes: 1 addition & 1 deletion report/test/generator/report-generator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion viewer/test/viewer-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down