Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: fix port forwarding tests in Docker

Max Schmitt31c76a086db7
diff --git a/tests/port-forwarding-server.spec.ts b/tests/port-forwarding-server.spec.ts
index bbe5d7e1d9..660ddaf022 100644
--- a/tests/port-forwarding-server.spec.ts
+++ b/tests/port-forwarding-server.spec.ts
@@ -146,5 +146,5 @@ it('should lead to the error page for forwarded requests when the connection is
else if (browserName === 'webkit')
expect(error.message).toBeTruthy();
else if (browserName === 'firefox')
- expect(error.message).toContain('NS_ERROR_CONNECTION_REFUSED');
+ expect(error.message.includes('NS_ERROR_NET_RESET') || error.message.includes('NS_ERROR_CONNECTION_REFUSED')).toBe(true);
});