Files
Matt Aitken 44d443a048 v3 live run reloading and minor style improvements (#925)
* Initial work creating the Redis publishing and subscribing

* Live view is working

* Show the live reloading status on the page

* Fixed some style issues on the run page with James

* Fix for invalid JSX attributes in the ExitIcon svg

* Some sexy shit

* The end line is now correctly coloured

* millisecondsToNanoseconds exported from core/v3 and imported correctly

* Fix for e2e tests, we changed the h1 to an h2

* Tidied imports

* Removed unused hook
2024-03-06 09:48:00 +00:00

44 lines
1.8 KiB
TypeScript

import { test, expect } from "@playwright/test";
test("Create an account", async ({ page }) => {
await page.goto("/login");
await page.getByRole("link", { name: "Continue with Email" }).click();
await page.getByPlaceholder("Email Address").type(`test_${Math.random()}@test.com`);
await page.getByRole("button", { name: "Send a magic link" }).click();
await expect(page.getByText("Welcome to Trigger.dev")).toBeVisible();
await page.getByLabel("Full name").type("John Doe");
await page.getByRole("button", { name: "Continue" }).click();
await page.getByLabel("Organization name").type("Test Org");
await page.getByLabel("Project name").type("Test Project");
await page.getByRole("button", { name: "Create" }).click();
await expect(
page.locator("h1").filter({ hasText: /^Choose a framework to get started/ })
).toBeVisible();
});
test("Verify jobs from the test nextjs project", async ({ page }) => {
await page.goto("/");
await page.getByRole("link", { name: "Continue with Email" }).click();
await page.getByPlaceholder("Email Address").type("test-user@test.com");
await page.getByRole("button", { name: "Send a magic link" }).click();
await page.getByRole("link", { name: "Projects" }).click();
await page.locator("a").filter({ hasText: "Test Project" }).click();
await page.getByRole("link", { name: "Environments & API Keys" }).click();
await expect(page.locator("h2").filter({ hasText: "Environments & API Keys" })).toBeVisible();
await expect(
page.locator("h3").filter({ hasText: "nextjs-test" })
// Set the timeout high to allow the cli to register jobs
).toBeVisible({ timeout: 15000 });
await page.getByRole("link", { name: "Jobs" }).click();
await expect(page.locator("h2").filter({ hasText: /^Jobs$/ })).toBeVisible();
await expect(page.getByRole("link", { name: /Test Job One/ })).toBeVisible();
});