diff --git a/playwright-tests/fork-snippet.spec.ts b/playwright-tests/fork-snippet.spec.ts deleted file mode 100644 index fd54a0d5..00000000 --- a/playwright-tests/fork-snippet.spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, expect } from "@playwright/test" - -test.beforeEach(async ({ page }) => { - await page.goto("http://127.0.0.1:5177/seveibar/push-button") - await page.getByRole("button", { name: "Log in" }).click() -}) - -test("test for forking a snippet", async ({ page }) => { - // Ensure the page is loaded and snippet title is visible - - // Ensure the Fork button is visible - const forkButton = page.getByRole("button", { name: "Fork" }) - await expect(forkButton).toBeVisible() - - // Fork the snippet - await forkButton.click() - - // Wait for any necessary UI updates or actions (adjust time if needed) - await page.waitForTimeout(3500) - - // Verify that the page reflects the fork action (optional based on your page behavior) - // Take a screenshot of the forked state - await expect(page).toHaveScreenshot("fork-snippet-button.png") -}) - -test("test for handling already forked snippet", async ({ page }) => { - // Ensure snippet is already forked before starting this test - await page.goto("http://127.0.0.1:5177/seveibar/push-button") - - // Attempt to fork again - const forkButton = page.getByRole("button", { name: "Fork" }) - await forkButton.click() - await page.waitForTimeout(2000) - // Take a screenshot of the error state - await expect(page).toHaveScreenshot("already-forked-error.png") -}) diff --git a/playwright-tests/snapshots/fork-snippet.spec.ts-already-forked-error.png b/playwright-tests/snapshots/fork-snippet.spec.ts-already-forked-error.png deleted file mode 100644 index e5205bb7..00000000 Binary files a/playwright-tests/snapshots/fork-snippet.spec.ts-already-forked-error.png and /dev/null differ diff --git a/playwright-tests/snapshots/fork-snippet.spec.ts-fork-snippet-button.png b/playwright-tests/snapshots/fork-snippet.spec.ts-fork-snippet-button.png deleted file mode 100644 index 023faa47..00000000 Binary files a/playwright-tests/snapshots/fork-snippet.spec.ts-fork-snippet-button.png and /dev/null differ