Skip to content

Commit

Permalink
fix(workspace): update examples and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherPHolder committed Aug 26, 2024
1 parent 3ea4393 commit e3fa1d9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type MeasureModes = 'navigate' |'snapshot' | 'startTimespan' | 'endTimesp
}>;*/
export type MeasurementStep = {
type: MeasureModes;
stepOptions?: { stepName?: string; }
stepOptions?: { name?: string; }
url?: string;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type UserFlowContext = {
};

export type StepOptions = {
stepName: string;
name: string;
} & {
/*page: Page,*/ config?: Config /*configContext?: LH.Config.FRContext*/;
};
Expand Down Expand Up @@ -59,4 +59,3 @@ export type UserFlowProvider = {
interactions: UserFlowInteractionsFn;
launchOptions?: LaunchOptions;
};

Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ export class UserFlowMock {
* @param {LH.NavigationRequestor} requestor
* @param {StepOptions=} stepOptions
*/
async navigate(requestor: any, { stepName }: StepOptions = {} as StepOptions): Promise<any> {
logVerbose(`flow#navigate: ${stepName || requestor}`);
async navigate(requestor: any, { name }: StepOptions = {} as StepOptions): Promise<any> {
logVerbose(`flow#navigate: ${name || requestor}`);
return this.page.goto(requestor);
}

Expand All @@ -296,21 +296,21 @@ export class UserFlowMock {
/**
* @param {StepOptions=} stepOptions
*/
async startTimespan({ stepName }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#startTimespan: ${stepName}`);
async startTimespan({ name }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#startTimespan: ${name}`);
return Promise.resolve();
}

async endTimespan({ stepName }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#endTimespan: ${stepName}`);
async endTimespan({ name }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#endTimespan: ${name}`);
return Promise.resolve();
}

/**
* @param {StepOptions=} stepOptions
*/
async snapshot({ stepName }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#snapshot: ${stepName}`);
async snapshot({ name }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#snapshot: ${name}`);
return Promise.resolve();
}

Expand Down Expand Up @@ -344,8 +344,8 @@ export class UserFlowReportMock {
* @param {LH.NavigationRequestor} requestor
* @param {StepOptions=} stepOptions
*/
async navigate(requestor: any, { stepName }: StepOptions = {} as StepOptions): Promise<any> {
logVerbose(`flow#navigate: ${stepName || requestor}`);
async navigate(requestor: any, { name }: StepOptions = {} as StepOptions): Promise<any> {
logVerbose(`flow#navigate: ${name || requestor}`);
return Promise.resolve();
}

Expand All @@ -356,21 +356,21 @@ export class UserFlowReportMock {
/**
* @param {StepOptions=} stepOptions
*/
async startTimespan({ stepName }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#startTimespan: ${stepName}`);
async startTimespan({ name }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#startTimespan: ${name}`);
return Promise.resolve();
}

async endTimespan({ stepName }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#endTimespan: ${stepName}`);
async endTimespan({ name }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#endTimespan: ${name}`);
return Promise.resolve();
}

/**
* @param {StepOptions=} stepOptions
*/
async snapshot({ stepName }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#snapshot: ${stepName}`);
async snapshot({ name }: StepOptions = {} as StepOptions): Promise<void> {
logVerbose(`flow#snapshot: ${name}`);
return Promise.resolve();
}

Expand Down
7 changes: 1 addition & 6 deletions packages/nx-plugin-integration/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
"node"
]
},
"exclude": [
"jest.config.ts",
"src/**/*.spec.ts",
"src/**/*.test.ts"
],
"include": [
"src/**/*.ts"
"**/*"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const interactions: UserFlowInteractionsFn = async (ctx: UserFlowContext): Promi
const { url} = collectOptions;

await flow.navigate(url, {
stepName: '🧭 Navigate to Home',
name: '🧭 Navigate to Home',
});
};

Expand Down
1 change: 0 additions & 1 deletion packages/user-flow-gh-integration/data/checkout.data.ts

This file was deleted.

0 comments on commit e3fa1d9

Please sign in to comment.