-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GOV.UK Chat tests #42
Conversation
|
||
test.describe("GOV.UK Chat", { tag: ["@app-govuk-chat"] }, () => { | ||
test("Can view a static page", async ({ page }) => { | ||
await page.goto("/chat/about"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Smokey test for this has a bit of logic within it to switch the host depending on the environment.
Chat is set up slightly differently on integration/staging vs prod currently. Chat is still in beta so it's only available via the external URL on prod. So a custom step definition was needed here to set the external URL differently on integration. Once we've got all environments consistent, we can delete this whole step definition file and just use the existing "When I visit x" definition.
(From alphagov/smokey#1332)
I can't tell if these e2e tests are running yet but it looks like from the helm charts that they are. So I'm wondering if this test will fail if it doesn't include the same logic as the Ruby test from Smokey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently this test will use the following URLs for each environments:
- www.gov.uk/chat/about
- www.staging.publishing.service.gov.uk/chat/about
- www.integration.publishing.service.gov.uk/chat/about
From my understanding of the smokey code, they should be?
- www.gov.uk/chat/about
- chat.staging.publishing.service.gov.uk/chat/about
- chat.integration.publishing.service.gov.uk/chat/about
(But slight confused as chat.integration.publishing.service.gov.uk redirects to www.integration.publishing.service.gov.uk/chat)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chat isn't live on production yet - the pilot is due to start on 14th October, at which point we'll enable the www.gov.uk/chat URL. But in order to test the infra works with the www
domain on integration and staging, we've enabled that route on both of those environments and set up the redirect you were seeing.
So from today up until the 14th October, the URLs would be:
- https://chat.publishing.service.gov.uk/chat
- https://www.staging.publishing.service.gov.uk/chat
- https://www.integration.publishing.service.gov.uk/chat
After launch the URLs would be:
- https://www.gov.uk/chat
- https://www.staging.publishing.service.gov.uk/chat
- https://www.integration.publishing.service.gov.uk/chat
We'll take responsibility of updating the production URL in this codebase once the pilot is live, but I think we'll need this test to use the www
domain for int/staging and the non-www domain for production right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behaviour the test should follow those after launch. As the only difference, prod url - which wouldn't stop deployments anyways.
To keep parity with Smokey:
alphagov/smokey#1332