From 3ed89db73cae05a618970ebfd0c597011a7b93df Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Wed, 19 Jul 2023 15:29:50 +0300 Subject: [PATCH] chore: added e2e test for title visibility in editor --- e2e-tests/specs/editor/page.spec.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 e2e-tests/specs/editor/page.spec.ts diff --git a/e2e-tests/specs/editor/page.spec.ts b/e2e-tests/specs/editor/page.spec.ts new file mode 100644 index 0000000000..1535de4b69 --- /dev/null +++ b/e2e-tests/specs/editor/page.spec.ts @@ -0,0 +1,19 @@ +import { test, expect } from '@playwright/test'; + +test.describe('Page Neve Options / Title Visibility', () => { + test('Starter Sites Plugin install from Dashboard Notice', async ({ + page, + }) => { + await page.goto('wp-admin/post-new.php?post_type=page'); + + await page.getByRole('textbox', { name: 'Add title' }).click(); + await page + .getByRole('textbox', { name: 'Add title' }) + .fill('Test Title Visibility'); + await page.getByRole('button', { name: 'Neve Options' }).click(); + const titleLocator = page.locator('h1.editor-post-title'); + await expect(titleLocator).toHaveCSS('opacity', '1'); + await page.getByLabel('Disable Title').check(); + await expect(titleLocator).toHaveCSS('opacity', '0.5'); + }); +});