From 17fee67e08e669ad70d4a1329beed5bc2d59671a Mon Sep 17 00:00:00 2001 From: John Hill Date: Fri, 20 Jan 2023 15:48:46 -0800 Subject: [PATCH] i've wasted too much time on this --- .../notebook/notebookSnapshots.e2e.spec.js | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/e2e/tests/functional/plugins/notebook/notebookSnapshots.e2e.spec.js b/e2e/tests/functional/plugins/notebook/notebookSnapshots.e2e.spec.js index af1895aeb3..c2dd1cac22 100644 --- a/e2e/tests/functional/plugins/notebook/notebookSnapshots.e2e.spec.js +++ b/e2e/tests/functional/plugins/notebook/notebookSnapshots.e2e.spec.js @@ -79,21 +79,30 @@ test.describe('Snapshot Container tests', () => { name: "Dropped Overlay Plot" }); - // await page.goto(notebook.url); + await page.getByRole('button', { name: ' Snapshot ' }).click(); + await page.getByRole('menuitem', { name: ' Save to Notebook Snapshots' }).click(); + await page.getByRole('button', { name: 'Show' }).click(); + }); test.fixme('5 Snapshots can be added to a container', async ({ page }) => {}); test.fixme('5 Snapshots can be added to a container and Deleted with Delete All action', async ({ page }) => {}); test.fixme('A snapshot can be Deleted from Container with 3 dot action menu', async ({ page }) => {}); - test.only('A snapshot can be Quick Viewed from Container with 3 dot action menu', async ({ page }) => { - await page.getByRole('button', { name: ' Snapshot ' }).click(); - await page.getByRole('menuitem', { name: ' Save to Notebook Snapshots' }).click(); - await page.getByRole('button', { name: 'Show' }).click(); + test.fixme('A snapshot can be Viewed, Annotated, display deleted, and saved from Container with 3 dot action menu', async ({ page }) => { + await page.locator('.c-snapshot.c-ne__embed').first().getByTitle('More options').click(); await page.getByRole('menuitem', { name: ' View Snapshot' }).click(); + await expect(page.locator('.c-overlay__outer')).toBeVisible(); await page.getByTitle('Annotate').click(); + await expect(page.locator('#snap-annotation-canvas')).toBeVisible(); await page.getByRole('button', { name: '' }).click(); + // await expect(page.locator('#snap-annotation-canvas')).not.toBeVisible(); await page.getByRole('button', { name: 'Save' }).click(); await page.getByRole('button', { name: 'Done' }).click(); - await page.pause(); + //await expect(await page.locator) + }); + test('A snapshot can be Quick Viewed from Container with 3 dot action menu', async ({ page }) => { + await page.locator('.c-snapshot.c-ne__embed').first().getByTitle('More options').click(); + await page.getByRole('menuitem', { name: 'Quick View' }).click(); + await expect(page.locator('.c-overlay__outer')).toBeVisible(); }); test.fixme('A snapshot can be Navigated To from Container with 3 dot action menu', async ({ page }) => {}); test.fixme('A snapshot can be Navigated To Item in Time from Container with 3 dot action menu', async ({ page }) => {});