-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0041418
commit da25855
Showing
15 changed files
with
89 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Page } from '@playwright/test'; | ||
|
||
export class BasePage { | ||
|
||
constructor(protected page: Page) {} | ||
|
||
public goto = (adress: string) => this.page.goto(adress); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { BasePage } from '../base/base.po'; | ||
|
||
export class DashboartFilterpanelPage extends BasePage { | ||
public readonly pageAdress = '/dashboard-filter-panel'; | ||
|
||
|
||
public gotoMainPage = async () => await this.goto(this.pageAdress); | ||
public weightedPipelineValue = () => this.page.getByText('Weighted pipeline value (€)', {exact: true}).first(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { DashboartFilterpanelPage } from './dashboard-filter-panel.po'; | ||
|
||
test.describe('Dashboard filter panel page', () => { | ||
test('should have working initial screen', async ({ page }) => { | ||
// given | ||
const dashboartFilterpanelPage = new DashboartFilterpanelPage(page); | ||
|
||
// when | ||
await dashboartFilterpanelPage.gotoMainPage(); | ||
await dashboartFilterpanelPage.weightedPipelineValue().waitFor({ state: 'visible' }); | ||
|
||
// then | ||
await expect(page).toHaveScreenshot('init-page.png', { maxDiffPixelRatio: 0.1, fullPage: true}); | ||
}); | ||
}); |
Binary file added
BIN
+102 KB
...rt-filter/dashboard-filter-panel.spec.ts-snapshots/init-page-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
e2e/tests/drag-n-drop-chart-library/drag-n-drop-chart-library.po.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { BasePage } from '../base/base.po'; | ||
|
||
export class DragNDropChartLibraryPage extends BasePage { | ||
public readonly pageAdress = '/drag-n-drop-chart-library'; | ||
|
||
public gotoMainPage = async () => await this.goto(this.pageAdress); | ||
} |
16 changes: 16 additions & 0 deletions
16
e2e/tests/drag-n-drop-chart-library/drag-n-drop-chart-library.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { DragNDropChartLibraryPage } from './drag-n-drop-chart-library.po'; | ||
|
||
test.describe('Drag and drop page', () => { | ||
test('should have working initial screen', async ({ page }) => { | ||
// given | ||
const dragNDropChartLibraryPage = new DragNDropChartLibraryPage(page); | ||
|
||
// when | ||
await dragNDropChartLibraryPage.gotoMainPage(); | ||
|
||
// then | ||
await expect(page).toHaveScreenshot('init-page.png', { maxDiffPixelRatio: 0.1, fullPage: true}); | ||
}); | ||
}); | ||
|
Binary file added
BIN
+11.7 KB
...ibrary/drag-n-drop-chart-library.spec.ts-snapshots/init-page-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
import { Page } from '@playwright/test'; | ||
import { BasePage } from '../base/base.po'; | ||
|
||
export class ReportBuilderPage { | ||
/** | ||
* @todo: Extract to config file | ||
*/ | ||
public readonly URL = 'https://d2ojv9ksm0gp58.cloudfront.net/report-builder/'; | ||
export class ReportBuilderPage extends BasePage { | ||
public readonly pageAdress = '/report-builder/'; | ||
|
||
constructor( | ||
private page: Page, | ||
) {} | ||
|
||
public gotoMainPage = () => this.page.goto(this.URL); | ||
public gotoMainPage = async () => await this.goto(this.pageAdress); | ||
|
||
public tableContainer = () => this.page.locator('.regular-table-container'); | ||
public chartOneBar = () => this.page.locator('.bars-container .bar').first(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-132 KB
...s/report-builder/report-builder.spec.ts-snapshots/init-page-chromium-darwin.png
Binary file not shown.
Binary file modified
BIN
-1.24 KB
(99%)
...ts/report-builder/report-builder.spec.ts-snapshots/init-page-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { BasePage } from '../base/base.po'; | ||
|
||
export class WearablesDashboardPage extends BasePage { | ||
public readonly pageAdress = '/wearables-dashboard'; | ||
|
||
public gotoMainPage = async () => await this.goto(this.pageAdress); | ||
public NumberOfStepsChart = () => this.page.getByText('Number of steps by minute', {exact: true}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { WearablesDashboardPage } from '../wearables-dashboard/wearables-dashboard.po'; | ||
|
||
test.describe('Wearables dashboard', () => { | ||
test('should have working initial screen', async ({ page }) => { | ||
// given | ||
const wearablesDashboardPage = new WearablesDashboardPage(page); | ||
|
||
// when | ||
await wearablesDashboardPage.gotoMainPage(); | ||
await wearablesDashboardPage.NumberOfStepsChart().waitFor({ state: 'visible' }); | ||
|
||
// then | ||
await expect(page).toHaveScreenshot('init-page.png', { maxDiffPixelRatio: 0.1, fullPage: true}); | ||
}); | ||
}); |
Binary file added
BIN
+317 KB
...es-dashboard/wearables-dashboard.spec.ts-snapshots/init-page-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.