Skip to content

Commit

Permalink
Merge pull request #58 from alphagov/exclude-tests-from-environments
Browse files Browse the repository at this point in the history
Make tests run only in suitable environments
  • Loading branch information
theseanything authored Oct 21, 2024
2 parents 167143f + f35ecd7 commit dde095e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/cdn.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ test.describe("CDN", { tag: ["@domain-www"] }, () => {
expect(response.headers()["location"]).toBe(expectedURL);
});

test("redirect service domain to www domain", { tag: ["@production"] }, async ({ page }) => {
test("redirect service domain to www domain", { tag: ["@not-staging", "@not-integration"] }, async ({ page }) => {
const response = await page.request.get("https://service.gov.uk", { maxRedirects: 0 });
expect(response.status()).toBe(302);
expect(response.headers()["location"]).toBe("https://www.gov.uk");
Expand Down
2 changes: 1 addition & 1 deletion tests/chat.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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.describe("GOV.UK Chat", { tag: ["@app-govuk-chat", "@not-production"] }, () => {
test("Can view a static page", async ({ page }) => {
await page.goto("/chat/about");
await expect(page.getByRole("heading", { name: "About GOV.UK Chat" })).toBeVisible();
Expand Down

0 comments on commit dde095e

Please sign in to comment.