Skip to content

Commit

Permalink
feat: otter sdk training - update of visual testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sdo-1A committed Nov 19, 2024
1 parent 81521ce commit b504352
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 1 deletion.
9 changes: 9 additions & 0 deletions apps/showcase/e2e-playwright/sanity/lighthouse-sanity.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,13 @@ test.describe('Lighthouse tests', () => {
await page.waitForURL('**/placeholder');
await performAudit('placeholder', page, testInfo);
});

test('sdk-intro', async ({page}, testInfo) => {
await page.goto(baseUrl);
const appFixture = new AppFixtureComponent(new O3rElement({element: page.locator('app-root'), page}));
await appFixture.navigateToSDKIntro();
await page.waitForURL('**/sdk-intro');
await performAudit('sdk-intro', page, testInfo);
});

});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions apps/showcase/e2e-playwright/sanity/visual-sanity.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,11 @@ test.describe.serial('Sanity test', () => {
await page.waitForURL('**/placeholder');
await expect(page).toHaveScreenshot([browserName, 'placeholder.png'], {fullPage: true, mask: [page.locator('.visual-testing-ignore')]});
});

await test.step('sdk-intro', async () => {
await appFixture.navigateToSDKIntro();
await page.waitForURL('**/sdk-intro');
await expect(page).toHaveScreenshot([browserName, 'sdk-intro.png'], {fullPage: true, mask: [page.locator('.visual-testing-ignore')]});
});
});
});
9 changes: 8 additions & 1 deletion apps/showcase/src/app/app.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export interface AppFixture extends ComponentFixtureProfile {
navigateToSDKGenerator(): Promise<void>;
/** Go to placeholder page */
navigateToPlaceholder(): Promise<void>;
/** Go to SDK-intro page */
navigateToSDKIntro(): Promise<void>;
}

export class AppFixtureComponent extends O3rComponentFixture implements AppFixture {
Expand Down Expand Up @@ -83,8 +85,13 @@ export class AppFixtureComponent extends O3rComponentFixture implements AppFixtu
}

/** @inheritDoc */
public async navigateToSDKGenerator() {
public async navigateToSDKIntro() {
await (await this.getSideNav()).clickOnLink(9);
}

/** @inheritDoc */
public async navigateToSDKGenerator() {
await (await this.getSideNav()).clickOnLink(10);
}

}

0 comments on commit b504352

Please sign in to comment.