From 1fd7d907aae43525531252449cfaaa77d5dced56 Mon Sep 17 00:00:00 2001 From: Holger Benl Date: Fri, 23 Feb 2024 14:31:32 +0100 Subject: [PATCH] test --- .../authenticated/comments-02.test.ts | 26 ++++++++++++++++--- .../e2e-tests/tests/breakpoints-01.test.ts | 6 ++++- .../SecondaryToolbox/NewConsole.tsx | 1 + 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/packages/e2e-tests/authenticated/comments-02.test.ts b/packages/e2e-tests/authenticated/comments-02.test.ts index 9e2a2f0a0e6..783cf683f67 100644 --- a/packages/e2e-tests/authenticated/comments-02.test.ts +++ b/packages/e2e-tests/authenticated/comments-02.test.ts @@ -1,3 +1,5 @@ +import { BrowserContext } from "@playwright/test"; + import { openDevToolsTab, startTest } from "../helpers"; import { E2E_USER_1, E2E_USER_2 } from "../helpers/authentication"; import { @@ -26,6 +28,8 @@ test(`authenticated/comments-02: Test shared comments and replies`, async ({ pageWithMeta: { recordingId, testScope }, testUsers, }) => { + let contextOne: BrowserContext; + let contextTwo: BrowserContext; let pageOne: Page; let pageTwo: Page; @@ -33,8 +37,8 @@ test(`authenticated/comments-02: Test shared comments and replies`, async ({ console.log("User 1: Add comment"); // User 1 - const context = await browser.newContext(); - const page = await context.newPage(); + contextOne = await browser.newContext(); + const page = await contextOne.newPage(); await load(page, recordingId, testUsers![0].apiKey, testScope); @@ -51,8 +55,8 @@ test(`authenticated/comments-02: Test shared comments and replies`, async ({ console.log("User 2: Reply to comment"); // User 2 - const context = await browser.newContext(); - const page = await context.newPage(); + contextTwo = await browser.newContext(); + const page = await contextTwo.newPage(); await load(page, recordingId, testUsers![1].apiKey, testScope); const commentLocator = await getComments(page, { @@ -84,8 +88,22 @@ test(`authenticated/comments-02: Test shared comments and replies`, async ({ await deleteAllComments(page); } + { + // User 2 + const page = pageTwo; + await page.reload(); + + // Verify reply is visible + await getComments(page, { + text: "This is a reply from user 2", + type: "source-code", + }); + } + { await pageOne.close(); + await contextOne.close(); await pageTwo.close(); + await contextTwo.close(); } }); diff --git a/packages/e2e-tests/tests/breakpoints-01.test.ts b/packages/e2e-tests/tests/breakpoints-01.test.ts index 407026a7f68..2a8123af485 100644 --- a/packages/e2e-tests/tests/breakpoints-01.test.ts +++ b/packages/e2e-tests/tests/breakpoints-01.test.ts @@ -7,9 +7,13 @@ import test from "../testFixtureCloneRecording"; test.use({ exampleKey: "doc_rr_basic_chromium.html" }); test(`breakpoints-01: Test basic breakpoint functionality`, async ({ - pageWithMeta: { page, recordingId }, + browser, + pageWithMeta: { recordingId }, exampleKey, }) => { + const context = await browser.newContext(); + const page = await context.newPage(); + await startTest(page, recordingId); await openDevToolsTab(page); diff --git a/src/ui/components/SecondaryToolbox/NewConsole.tsx b/src/ui/components/SecondaryToolbox/NewConsole.tsx index 7c8c0842b46..a6df558ca45 100644 --- a/src/ui/components/SecondaryToolbox/NewConsole.tsx +++ b/src/ui/components/SecondaryToolbox/NewConsole.tsx @@ -5,6 +5,7 @@ import { ConsoleNag } from "../shared/Nags/Nags"; // Adapter that connects the legacy app Redux stores to the newer React Context providers. export default function NewConsoleRoot() { + console.log("Rendering NewConsoleRoot"); const [consoleFilterDrawerDefaultsToOpen] = useGraphQLUserData("console_showFiltersByDefault"); return (