-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
front: editor: testing infra editor e2e
- Loading branch information
1 parent
b874d01
commit 35b02c1
Showing
3 changed files
with
35 additions
and
1 deletion.
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,11 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { PlaywrightEditorPage } from './pages/infra-editor-page-model'; | ||
|
||
test.describe('Testing the Infra Editor app', () => { | ||
test('Testing there is no error by default in the Editor', async ({ page }) => { | ||
const playwrightEditorPage = new PlaywrightEditorPage(page); | ||
await playwrightEditorPage.goToEditorPage(); | ||
|
||
await expect(playwrightEditorPage.getErrorBox).not.toBeVisible(); | ||
}); | ||
}); |
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,23 @@ | ||
/** | ||
* tests setup for the infra editor page | ||
*/ | ||
|
||
/* eslint-disable import/prefer-default-export */ | ||
import { Locator, Page } from '@playwright/test'; | ||
|
||
export class PlaywrightEditorPage { | ||
// The current page object | ||
readonly page: Page; | ||
|
||
readonly getErrorBox: Locator; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
this.getErrorBox = page.locator('.error-box'); | ||
} | ||
|
||
// Navigate to the infra page | ||
async goToEditorPage() { | ||
await this.page.goto('/editor'); | ||
} | ||
} |