|
1 | | -import { expect, test } from '@playwright/test' |
2 | | -import { login } from '../support/login' |
| 1 | +import { expect, test } from "@playwright/test"; |
| 2 | +import { login } from "../support/login"; |
| 3 | +import { NoteEditor } from "../support/sections/NoteEditor"; |
3 | 4 |
|
4 | | -test.describe('Basic checks', () => { |
5 | | - test.beforeEach(async ({ page }) => { |
6 | | - await login(page) |
7 | | - }) |
| 5 | +test.describe("Basic checks", () => { |
| 6 | + test.beforeEach(async ({ page }) => { |
| 7 | + await login(page); |
| 8 | + }); |
8 | 9 |
|
9 | | - test('Notes app is visible', async ({ page }) => { |
10 | | - await page.goto('/index.php/apps/notes/') |
11 | | - await expect(page).toHaveTitle(/Notes/) |
12 | | - }) |
13 | | -}) |
| 10 | + test("Notes app is visible", async ({ page }) => { |
| 11 | + await page.goto("/index.php/apps/notes/"); |
| 12 | + await expect(page).toHaveTitle(/Notes/); |
| 13 | + }); |
| 14 | + |
| 15 | + test("Create note and type", async ({ page }) => { |
| 16 | + await page.goto("/index.php/apps/notes/"); |
| 17 | + await page |
| 18 | + .locator("#app-navigation-vue") |
| 19 | + .getByRole("button", { name: "New note" }) |
| 20 | + .click(); |
| 21 | + const editor = new NoteEditor(page); |
| 22 | + await editor.type("Hello from Playwright"); |
| 23 | + await expect(editor.content).toContainText("Hello from Playwright"); |
| 24 | + }); |
| 25 | +}); |
0 commit comments