Skip to content

Commit

Permalink
Changed playwright config
Browse files Browse the repository at this point in the history
  • Loading branch information
praveen5959 committed Nov 15, 2024
1 parent 8f673e6 commit 5776cd3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
7 changes: 7 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ export default defineConfig({
// use: { ...devices['Desktop Safari'] },
// },
],

/* Run your local dev server before starting the tests */
webServer: {
command: 'pnpm run dev',
url: 'http://localhost:3001',
reuseExistingServer: !process.env.CI,
},
});
4 changes: 3 additions & 1 deletion tests/home.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ test.describe('Home Page', () => {
test.beforeEach(async ({ page }) => {
await page.goto(`${TEST_URL}`);
});

test('check welcome', async ({ page }) => {
await expect(page.locator('text=Welcome back')).toBeVisible();
});
test('should render the component correctly with default state', async ({ page }) => {
await expect(page.locator('text=All Streams')).toBeVisible();
await expect(page.locator('input[placeholder="Search Stream"]')).toBeVisible();
Expand Down
13 changes: 0 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@ import path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
server: {
host: true,
port: 3001,
strictPort: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
},
preview: {
port: 3001,
strictPort: true,
},
clearScreen: false,
plugins: [react()],
resolve: {
alias: {
Expand Down

0 comments on commit 5776cd3

Please sign in to comment.