Skip to content

Commit 41de93b

Browse files
committed
Fix failing test
1 parent c864e73 commit 41de93b

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"postinstall": "npm --prefix ui install && npm --prefix lambdas install && npm --prefix tests install",
88

99
"test": "npm --prefix ui run test && npm --prefix lambdas run test",
10-
"test:playwright": "UI_BASE_URL=$(terraform -chdir=local-environment/infra output -raw ui_url) API_BASE_URL=$(terraform -chdir=local-environment/infra output api_base_url) npm --prefix tests run test:chrome",
10+
"test:playwright": "UI_BASE_URL=$(terraform -chdir=local-environment/infra output -raw ui_url) API_BASE_URL=$(terraform -chdir=local-environment/infra output -raw api_base_url) npm --prefix tests run test:chrome",
1111

1212
"build:lambdas": "npm --prefix lambdas run build",
1313
"package:lambdas": "npm --prefix lambdas run package",

tests/fixtures/consoleErrorFixture.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,16 @@ interface ConsoleErrorFixture {
3535
const defaultOptions: ErrorCaptureOptions = {
3636
failOnConsoleError: true,
3737
failOnNetworkError: true,
38-
ignorePatterns: [],
38+
ignorePatterns: [
39+
// Network transient errors
40+
/net::ERR_NETWORK_CHANGED/,
41+
/net::ERR_CONNECTION_RESET/,
42+
/net::ERR_INTERNET_DISCONNECTED/,
43+
// External NHS resources not available in test environment
44+
/NHSCookieConsent is not defined/,
45+
/nhsapp is not defined/,
46+
/"undefined" is not valid JSON/,
47+
],
3948
ignoreStatusCodes: [],
4049
};
4150

0 commit comments

Comments
 (0)