-
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { expect } from "@playwright/test"; | ||
import { test } from "../lib/cachebust-test"; | ||
import { publishingAppUrl } from "../lib/utils"; | ||
|
||
test.describe("GOV.UK Chat", { tag: ["@app-govuk-chat"] }, () => { | ||
test("Can view a static page", async ({ page }) => { | ||
await page.goto("/chat/about"); | ||
await expect(page.getByRole("heading", { name: "About GOV.UK Chat" })).toBeVisible(); | ||
}); | ||
}); | ||
|
||
test.describe("GOV.UK Chat Admin", { tag: ["@app-govuk-chat"] }, () => { | ||
test.use({ baseURL: publishingAppUrl("chat") }); | ||
|
||
test("Can log in to chat admin", async ({ page }) => { | ||
await page.goto("/admin"); | ||
jackbot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
await expect(page.getByRole("heading", { name: "GOV.UK Chat Admin" })).toBeVisible(); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
(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:
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)
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:
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.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.