Issue 1:
System info

Playwright Version: [v1.35.1]

Operating System: [All]

Browser: [All]

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

Steps

Clone this repo and using your shell of choice navigate to the root of the repo.

Execute npm start. This will build and run an angular app.

Once the angular app is running, execute npm test

When running with node 16.19.1 the output after step 3 is:

> demo-app@0.0.0 test
> npx playwright test

Running 1 test using 1 worker

✓ 1 [chromium] › example.spec.ts:3:5 › dummy test (1.8s)

1 passed (2.6s)

When running with node 18.16.0 the output after step 3 is:

> demo-app@0.0.0 test
> npx playwright test

[WebServer] ? Port 4200 is already in use.
Would you like to use a different port? (Y/n) [WebServer]
Error: Timed out waiting 30000ms from config.webServer.

As you can see, it tries to execute the webServer.command and then eventually times out because the port is already taken.

Expected

When running on node 18.16.0 it should NOT try to execute the webServer.command when webServer.reuseExistingServer is set to true.

Actual

When running on node 18.16.0 it executes the webServer.command when webServer.reuseExistingServer is set to true.

Other

I used nvm to swap between node versions whilst testing this.

Issue 2:
System info

Playwright Version: [v8.17.0]

Operating System: Windows 10 Pro

Browser: Chromium

Other info:

Source code

Due to security aspects i cannot share the company code. I would appreciate any help you can provide with out reproducing the problem on your computer. when i run the test either by debug either by run test i see that every step passes succefuly. In the terminal i see it writes test passes. but then it reruns the test again as if it failed. and also in the final report it writes failed.

I am attaching the test code - u will not be able to run it locally but maybe it could help.

also I have 30 tests it HAPPENS ONLY in this test. al the rest are fine. this is not the only test that run with for

(const hotelSupplier of hotelSupplierList)

TEST CODE

const test = require('../testFixtures/fixture')
const fs = require('fs')
const testDataLogic = JSON.parse(fs.readFileSync('./data/homePageLogicData.json', 'utf-8'))
const { parse } = require('csv-parse/sync')
const hotelSupplierList = parse(fs.readFileSync('./data/hotelSupplierForHotelQouteTest.csv'), {
columns: true,
skip_empty_lines: true
})

test.beforeEach(async ({ homePageLogic }, testInfo) => {
console.log(`Running ${testInfo.title}`)
await homePageLogic.openApp()
})

test.afterEach(async ({ page }, testInfo) => {
console.log(`Finished ${testInfo.title} with status ${testInfo.status}`)

if (testInfo.status !== testInfo.expectedStatus) { console.log(`Did not run as expected, ended up at ${page.url()}`) }
})

for (const hotelSupplier of hotelSupplierList) {
test.setTimeout(320000)
test(`Produce Hotel Quetaion and validate quotaion Arrives To Mail ${hotelSupplier.HotelSupplierName}`, async ({ homePageLogic, emailHelperPage }) => {
await test.step('Create Trip and add PaxTo Trip', async () => {
await homePageLogic.createNewTrip()
await homePageLogic.addPaxToTripByID(testDataLogic.paxidKarimAbdul)
await homePageLogic.validatePaxIDVisibleInTrip(testDataLogic.paxidKarimAbdul)
})

await test.step('search Hotel + choose Hotel + add qoute to cart + send mail ', async () => {
await homePageLogic.pressOnHotelSearchButton()
await homePageLogic.searchHotel(testDataLogic.destinationCity, '', hotelSupplier.HotelSupplierName)
await homePageLogic.selectHotelFirstResult()
await homePageLogic.addToQouteAndSendByMail()
})

await test.step('go to gmail verify email was recived with the subject hotel quote', async () => {
const emailReturned = await emailHelperPage.returnMail('helpers/credentialsAmsalemMail.json', 'helpers/tokenAmsalemMail.json', testDataLogic.AgentRobotestEmailBox, 'Quote for: ' + testDataLogic.KarimAbdulFullName)
await emailHelperPage.validateMailWasFound(emailReturned)
})
})
}

playwright.config.js file

const config = {
reporter: 'list',
retries: 1,
workers: 3,
timeout: 150000,
fullyParallel: true,
use: {
video: 'retain-on-failure',
screenshot: 'only-on-failure',
browserName: 'chromium',
headless: false,
viewport: { width: 1100, height: 850 }
},
expect: {
timeout: 4000
}
}

module.exports = config

Steps

run the test

Expected

in the terminal it will be written test passed and test wont rerun again as if failed.

Actual

in the terminal --> "test passed" but it reruns again and in the end it marked as failed