Check the note after reopening it

A reopened note shows whether the editor kept an edit.

The Note field starts with “Draft note”. Both editors can show “Saved”. The faulty editor loads the old text when you choose Reopen note. Playwright’s guide to testing visible behavior

Run tests runs your test against the working practice app. Verify also runs it against a copy with a bug added on purpose.

Try it yourself

Write a test that saves different text and checks the note after reopening it. Run tests must pass on the working editor. Verify must catch the faulty editor reopening the old text.

Starter code

import { test, expect } from "@playwright/test";

test("the saved note keeps my edit when reopened", async ({ page }) => {
  await page.goto("/");
  // Write the actions and the check here.
});

Open this page on a desktop or laptop. You can edit and run the code there.

The lecture for this exercise