From 89670f25a0c59945b5c330db778941922a846da9 Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Thu, 14 Nov 2024 16:44:03 +0000 Subject: [PATCH 1/2] Fix jasmine tests not running in govuk-docker --- package.json | 3 +++ yarn.lock | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 14a8bb5865..959fdf54f9 100644 --- a/package.json +++ b/package.json @@ -48,5 +48,8 @@ "stylelint": "^16.10.0", "stylelint-config-gds": "^2.0.0" }, + "resolutions": { + "selenium-webdriver": "4.17.0" + }, "packageManager": "yarn@3.5.0" } diff --git a/yarn.lock b/yarn.lock index 0840ea6221..cd44516dee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3867,14 +3867,14 @@ __metadata: languageName: node linkType: hard -"selenium-webdriver@npm:^4.12.0": - version: 4.12.0 - resolution: "selenium-webdriver@npm:4.12.0" +"selenium-webdriver@npm:4.17.0": + version: 4.17.0 + resolution: "selenium-webdriver@npm:4.17.0" dependencies: jszip: ^3.10.1 tmp: ^0.2.1 - ws: ">=8.13.0" - checksum: e02f131359fb5575f757fa5389f5e6bad145cdf4f5a8e066d73793d806041bdbdd1c8422ef3d7658ef33e52597b85561df397a3e58ee355215c9e32bce588b3e + ws: ">=8.14.2" + checksum: 0f559c8cf5b3e6c366083fb8822305f7fb7beac58a40ea4f536ff2a2f9a8adbdd93d68ad78c965c34a3814bc0ce2efbbcde23faa8686d01914ec32596bcde0de languageName: node linkType: hard @@ -4801,9 +4801,9 @@ __metadata: languageName: node linkType: hard -"ws@npm:>=8.13.0": - version: 8.17.1 - resolution: "ws@npm:8.17.1" +"ws@npm:>=8.14.2": + version: 8.18.0 + resolution: "ws@npm:8.18.0" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ">=5.0.2" @@ -4812,7 +4812,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 442badcce1f1178ec87a0b5372ae2e9771e07c4929a3180321901f226127f252441e8689d765aa5cfba5f50ac60dd830954afc5aeae81609aefa11d3ddf5cecf + checksum: 91d4d35bc99ff6df483bdf029b9ea4bfd7af1f16fc91231a96777a63d263e1eabf486e13a2353970efc534f9faa43bdbf9ee76525af22f4752cbc5ebda333975 languageName: node linkType: hard From 9fd0aca844fe8b2768f7d2ab3fd4bf26192bb78e Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Thu, 14 Nov 2024 17:07:03 +0000 Subject: [PATCH 2/2] Fix pact tests running locally - Pact tests run in development environment locally, so explicitly allow "example.org" for that environment - default branch should be branch-main --- config/environments/development.rb | 1 + spec/service_consumers/pact_helper.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 44a57bf883..92bae2cd04 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -67,6 +67,7 @@ config.file_watcher = ActiveSupport::EventedFileUpdateChecker config.hosts << "frontend.dev.gov.uk" + config.hosts << "example.org" # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true diff --git a/spec/service_consumers/pact_helper.rb b/spec/service_consumers/pact_helper.rb index 1dee81c62b..fd00aa0f0b 100644 --- a/spec/service_consumers/pact_helper.rb +++ b/spec/service_consumers/pact_helper.rb @@ -23,7 +23,7 @@ def url_encode(str) else base_url = "https://govuk-pact-broker-6991351eca05.herokuapp.com" path = "pacts/provider/#{url_encode(name)}/consumer/#{url_encode(consumer_name)}" - version_modifier = "versions/#{url_encode(ENV.fetch('PACT_CONSUMER_VERSION', 'master'))}" + version_modifier = "versions/#{url_encode(ENV.fetch('PACT_CONSUMER_VERSION', 'branch-main'))}" pact_uri("#{base_url}/#{path}/#{version_modifier}") end @@ -38,6 +38,7 @@ def url_encode(str) schema_name: "calendar", document_type: "calendar", } + stub_content_store_has_item("/bank-holidays", content_item) end end