Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions tests/Negative_tests/01_Record_tests.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { test, expect } from "@playwright/test";

test("login negative test", async ({ page }) => {
test.fail(process.env.CI === "true", "Known negative case while exploring");
await test.step("Navigating to url", async () => {
await page.goto("https://www.saucedemo.com/");
});
Expand All @@ -17,7 +16,7 @@ test("login negative test", async ({ page }) => {

await test.step("Validate error message", async () => {
await expect(
page.getByText("test Username and password do not match")
page.getByText("Username and password do not match")
).toBeVisible();
});
});
2 changes: 2 additions & 0 deletions tests/Positive_tests/02_Loginpage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { test, expect } from "@playwright/test";
*/

test("Login Page test case", async ({ page }) => {
test.skip(!process.env.BASE_URL || process.env.BASE_URL.includes("example.com"), "Skipping test because BASE_URL is not set or is example.com");

// Navigate
const base = process.env.BASE_URL ?? "https://example.com";
await page.goto(base, { waitUntil: "domcontentloaded" });
Expand Down