Skip to content
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

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Add GOV.UK Chat tests #42

merged 1 commit into from
Oct 16, 2024

Conversation

theseanything
Copy link
Contributor

To keep parity with Smokey:

alphagov/smokey#1332


test.describe("GOV.UK Chat", { tag: ["@app-govuk-chat"] }, () => {
test("Can view a static page", async ({ page }) => {
await page.goto("/chat/about");
Copy link

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.

Copy link
Contributor Author

@theseanything theseanything Oct 4, 2024

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:

From my understanding of the smokey code, they should be?

(But slight confused as chat.integration.publishing.service.gov.uk redirects to www.integration.publishing.service.gov.uk/chat)

Copy link

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:

After launch the URLs would be:

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.

Copy link
Contributor Author

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.

@theseanything theseanything merged commit 042d1e1 into main Oct 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants