Skip to content

Commit

Permalink
playing with config of tests in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wkelly17 committed Dec 6, 2023
1 parent d0a7d47 commit 1de9dd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default defineConfig({
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
// forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
retries: process.env.CI ? 1 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 2 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
Expand All @@ -27,9 +27,7 @@ export default defineConfig({
},
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: process.env.CI
? "http://localhost:4173/"
: "http://localhost:5173/",
baseURL: process.env.CI ? "http://localhost:4173" : "http://localhost:5173",

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
Expand Down Expand Up @@ -78,8 +76,8 @@ export default defineConfig({
command: process.env.CI
? "npm run build && npm run preview"
: "npm run dev",
url: process.env.CI ? "http://localhost:4173/" : "http://localhost:5173/",
// reuseExistingServer: !process.env.CI,
reuseExistingServer: true,
url: process.env.CI ? "http://localhost:4173" : "http://localhost:5173",
reuseExistingServer: !process.env.CI,
// reuseExistingServer: true,
},
});
4 changes: 2 additions & 2 deletions tests/dot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test("No horizontal scroll", async ({page}) => {
);
expect(doesNotHaveHorizontalScroll).toBe(true);
});
test("New Testament renders 27 books", async ({page}) => {
test.only("New Testament renders 27 books", async ({page}) => {
await page.goto("/benin");
const playlistListing = page.getByTestId("booksAvailable");
await playlistListing.waitFor();
Expand Down Expand Up @@ -65,7 +65,7 @@ test("state data attributes for chapter / vid are correct", async ({page}) => {
expect(isChap1).toBeTruthy();
});

test("chapter changes on click", async ({page}) => {
test.only("chapter changes on click", async ({page}) => {
await page.goto("/benin");

const chap2Btn = page
Expand Down

0 comments on commit 1de9dd9

Please sign in to comment.