Skip to content

Commit

Permalink
test playwright 3
Browse files Browse the repository at this point in the history
  • Loading branch information
DavyR01 committed Jul 6, 2024
1 parent 1c7a389 commit e3bbd30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
18 changes: 8 additions & 10 deletions e2e/tests/frontend.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { expect, test } from "@playwright/test";

test("Find URL and title", async ({ page }) => {
// await page.goto("http://frontend:3000/", { timeout: 60000 });

await page.goto("http://localhost:3000/", { timeout: 60000 });
await page.goto("http://frontend:3000/", { timeout: 60000 });
// await page.goto("http://localhost:3000/", { timeout: 60000 });

await page.pause()
await expect(
Expand All @@ -14,13 +13,12 @@ test("Find URL and title", async ({ page }) => {
});

test("Find all pages", async ({ page }) => {
// await page.goto("http://frontend:3000/products");
// await page.goto("http://frontend:3000/cart");
// await page.goto("http://frontend:3000/login");

await page.goto("http://localhost:3000/products");
await page.goto("http://localhost:3000/cart");
await page.goto("http://localhost:3000/login");
await page.goto("http://frontend:3000/products");
await page.goto("http://frontend:3000/cart");
await page.goto("http://frontend:3000/login");
// await page.goto("http://localhost:3000/products");
// await page.goto("http://localhost:3000/cart");
// await page.goto("http://localhost:3000/login");
});

// cmd execute test : pnpm exec playwright test
8 changes: 3 additions & 5 deletions e2e/tests/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ test.describe('Login Page', () => {

test('should load login page and display all elements', async ({ page }) => {
// Navigate to the login page
// await page.goto('http://frontend:3000/login');

await page.goto('http://localhost:3000/login');


await page.goto('http://frontend:3000/login');
// await page.goto('http://localhost:3000/login');

// Wait for the page to load
await page.waitForLoadState('networkidle');

Expand Down

0 comments on commit e3bbd30

Please sign in to comment.