A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
chore: e2e - count() -> toHaveCount() (#1097)
Akshay Agrawale9312ae3480f
diff --git a/frontend/e2e-tests/cells.spec.ts b/frontend/e2e-tests/cells.spec.tsindex 28c6b6c8a6..1a7214fd6a 100644--- a/frontend/e2e-tests/cells.spec.ts+++ b/frontend/e2e-tests/cells.spec.ts@@ -48,14 +48,14 @@ test("page renders 2 cells", async ({ page }) => {// No add buttons are visibleawait expect(- page.getByTestId("create-cell-button").locator(":visible").count(),- ).resolves.toBe(0);+ page.getByTestId("create-cell-button").locator(":visible"),+ ).toHaveCount(0);// Hover over a cell the 'add cell' button appearsawait page.hover("text=Cell 1");await expect(- page.getByTestId("create-cell-button").locator(":visible").count(),- ).resolves.toBe(2);+ page.getByTestId("create-cell-button").locator(":visible"),+ ).toHaveCount(2);// Clicking the first button creates a new cell at the topawait pagediff --git a/frontend/e2e-tests/components.spec.ts b/frontend/e2e-tests/components.spec.tsindex 584b7fa1e0..21e7a72e5a 100644--- a/frontend/e2e-tests/components.spec.ts+++ b/frontend/e2e-tests/components.spec.ts@@ -36,7 +36,7 @@ test("page renders read only view in read mode", async ({ page }) => {// Filename is not visibleawait expect(page.getByText("components.py").last()).not.toBeVisible();// Has elements with class name 'controls'- expect(await page.locator("#save-button").count()).toBe(0);+ await expect(page.locator("#save-button")).toHaveCount(0);// Can see outputawait expect(page.locator("h1").getByText("UI Elements")).toBeVisible();diff --git a/frontend/e2e-tests/disabled.spec.ts b/frontend/e2e-tests/disabled.spec.tsindex 2f20688c55..4c0338e68e 100644--- a/frontend/e2e-tests/disabled.spec.ts+++ b/frontend/e2e-tests/disabled.spec.ts@@ -23,8 +23,8 @@ test("disabled cells", async ({ page }) => {// No add buttons are visibleawait expect(- page.getByTestId("create-cell-button").locator(":visible").count(),- ).resolves.toBe(0);+ page.getByTestId("create-cell-button").locator(":visible"),+ ).toHaveCount(0);// Hover over a cell the drag button button appears// Click the drag button and then disable the celldiff --git a/frontend/e2e-tests/helper.ts b/frontend/e2e-tests/helper.tsindex 41d27797c7..95ae50216d 100644--- a/frontend/e2e-tests/helper.ts+++ b/frontend/e2e-tests/helper.ts@@ -14,8 +14,8 @@ export async function createCellBelow(opts: {// Hover over a cell the 'add cell' button appearsawait page.hover(cellSelector);await expect(- page.getByTestId("create-cell-button").locator(":visible").count(),- ).resolves.toBe(2);+ page.getByTestId("create-cell-button").locator(":visible"),+ ).toHaveCount(2);// Clicking the first button creates a new cell belowawait pagediff --git a/frontend/e2e-tests/mode.spec.ts b/frontend/e2e-tests/mode.spec.tsindex 03ff3a2ad9..841e32f952 100644--- a/frontend/e2e-tests/mode.spec.ts+++ b/frontend/e2e-tests/mode.spec.ts@@ -49,7 +49,7 @@ test("page renders read only view in read mode", async ({ page }) => {// Filename is not visibleawait expect(page.getByText("components.py").last()).not.toBeVisible();// Has elements with class name 'controls'- expect(await page.locator("#save-button").count()).toBe(0);+ await expect(page.locator("#save-button")).toHaveCount(0);// Can see outputawait expect(page.locator("h1").getByText("UI Elements")).toBeVisible();