Skip to content

Commit c44b217

Browse files
committed
tests fix maybe
1 parent ff9eeec commit c44b217

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

playwright.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = defineConfig({
2525
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2626
use: {
2727
/* Base URL to use in actions like `await page.goto('/')`. */
28-
baseURL: `http://localhost:42069`,
28+
baseURL: 'http://localhost:3000',
2929

3030
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
3131
trace: "on-first-retry",
@@ -72,7 +72,7 @@ module.exports = defineConfig({
7272
/* Run your local dev server before starting the tests */
7373
webServer: {
7474
command: "pnpm run start",
75-
url: "http://127.0.0.1:42069",
75+
url: "http://127.0.0.1:3000",
7676
reuseExistingServer: !process.env.CI,
7777
timeout: 120 * 1000,
7878
},

server.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,3 @@ app.get('/', (req, res) => {
2020
app.listen(PORT, () =>
2121
console.log(`Server running on port http://localhost:${PORT}`)
2222
);
23-
24-
25-
/**
26-
* const { chromium } = require('playwright');
27-
28-
(async () => {
29-
const browser = await chromium.launch();
30-
const page = await browser.newPage();
31-
32-
await page.goto('http://localhost:3000');
33-
34-
// Wait for the 'Hello World' message to be displayed
35-
await page.waitForSelector('body');
36-
const text = await page.$eval('body', (element) => element.textContent);
37-
38-
// Assert the response
39-
if (text.includes('Hello World')) {
40-
console.log('Test Passed: "Hello World" message is displayed');
41-
} else {
42-
console.error('Test Failed: "Hello World" message is not displayed');
43-
}
44-
45-
await browser.close();
46-
})();
47-
*/

0 commit comments

Comments
 (0)