diff --git a/front/playwright.config.ts b/front/playwright.config.ts index 7f4d8113091..6e96723f2a4 100644 --- a/front/playwright.config.ts +++ b/front/playwright.config.ts @@ -62,7 +62,7 @@ const config: PlaywrightTestConfig = { /* select tags to run specific tests */ // TODO: remove grep when every tests are refactored - grep: [/home/, /project/, /study/, /scenario/], + grep: [/home/, /project/, /study/, /scenario/, /editor/], }; export default config; diff --git a/front/tests/010-infra-editor.spec.ts b/front/tests/010-infra-editor.spec.ts new file mode 100644 index 00000000000..b9e7d5682c9 --- /dev/null +++ b/front/tests/010-infra-editor.spec.ts @@ -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(); + }); +}); diff --git a/front/tests/pages/infra-editor-page-model.ts b/front/tests/pages/infra-editor-page-model.ts new file mode 100644 index 00000000000..0cba6b22474 --- /dev/null +++ b/front/tests/pages/infra-editor-page-model.ts @@ -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'); + } +}