Skip to content

Commit

Permalink
fix: update e2e tests for newer changes in site
Browse files Browse the repository at this point in the history
  • Loading branch information
praveen-quizizz committed Oct 7, 2024
1 parent 0cadee6 commit 8c62d9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
14 changes: 0 additions & 14 deletions e2e/home.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ test.describe("Confirm homepage content", () => {
await expect(page.locator("h3")).toContainText("Trending");
});

test("Different devices", async ({ page, isMobile }) => {
await page.goto("http://localhost:3000/");

const elementVisible = await page
.locator('text="Recommended topics"')
.isVisible();

if (isMobile) {
expect(elementVisible).toBe(false);
} else {
expect(elementVisible).toBe(true);
}
});

test.describe("Confirm image accessibiliy content", () => {
test("Shared content", async ({ page }) => {
// Accessibility
Expand Down
4 changes: 2 additions & 2 deletions e2e/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test.beforeEach(async ({ page }) => {
test.describe("Login Page", () => {
test("should display the login button", async ({ page }) => {
const loginButton = page.getByRole("button", {
name: "Login with GitHub",
name: "Continue with GitHub",
});
expect(loginButton).toBeTruthy();
});
Expand All @@ -23,7 +23,7 @@ test.describe("Login Page", () => {
page,
}) => {
const button = page.getByRole("button", {
name: "Login with GitHub",
name: "Continue with GitHub",
});

await button.click();
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"prettier": "prettier --check -c '**/*.{ts,tsx,js,jsx,json,json5,scss,css,html,mdx}'",
"prettier:fix": "prettier --write -c '**/*.{ts,tsx,js,jsx,json,json5,scss,css,html,mdx}'",
"test": "npx playwright install && playwright test",
"test:e2e:ui": "ENV=local npx playwright test --ui",
"db:generate": "drizzle-kit generate",
"db:push": "drizzle-kit push",
"db:migrate": "npx tsx -r dotenv/config ./drizzle/migrate.ts",
Expand Down

0 comments on commit 8c62d9c

Please sign in to comment.