Skip to content

Commit c51903a

Browse files
committed
Logo URL
1 parent dfe7558 commit c51903a

File tree

1 file changed

+42
-11
lines changed

1 file changed

+42
-11
lines changed

site/e2e/tests/deployment/appearance.spec.ts

+42-11
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,52 @@ test("set application name", async ({ page }) => {
99
const applicationName = randomName();
1010

1111
// Fill out the form
12-
const form = page.locator("form", { hasText: "Application name"})
13-
await form.getByLabel("Application name", { exact: true}).fill(applicationName);
14-
await form.getByRole("button", { name: "Submit"}).click();
12+
const form = page.locator("form", { hasText: "Application name" });
13+
await form
14+
.getByLabel("Application name", { exact: true })
15+
.fill(applicationName);
16+
await form.getByRole("button", { name: "Submit" }).click();
1517

1618
// Open a new session without cookies to see the login page
17-
const browser = await chromium.launch()
18-
const incognitoContext = await browser.newContext()
19-
await incognitoContext.clearCookies()
20-
const incognitoPage = await incognitoContext.newPage()
19+
const browser = await chromium.launch();
20+
const incognitoContext = await browser.newContext();
21+
await incognitoContext.clearCookies();
22+
const incognitoPage = await incognitoContext.newPage();
2123
await incognitoPage.goto("/", { waitUntil: "domcontentloaded" });
2224

23-
const banner = incognitoPage.locator("h1", { hasText: applicationName})
24-
await expect(banner).toBeVisible()
25+
// Verify banner
26+
const banner = incognitoPage.locator("h1", { hasText: applicationName });
27+
await expect(banner).toBeVisible();
2528

2629
// Shut down browser
27-
await incognitoPage.close()
28-
await browser.close()
30+
await incognitoPage.close();
31+
await browser.close();
32+
});
33+
34+
test("set application logo", async ({ page }) => {
35+
requiresEnterpriseLicense();
36+
37+
await page.goto("/deployment/appearance", { waitUntil: "domcontentloaded" });
38+
39+
const imageLink = "/icon/azure.png";
40+
41+
// Fill out the form
42+
const form = page.locator("form", { hasText: "Logo URL" });
43+
await form.getByLabel("Logo URL", { exact: true }).fill(imageLink);
44+
await form.getByRole("button", { name: "Submit" }).click();
45+
46+
// Open a new session without cookies to see the login page
47+
const browser = await chromium.launch();
48+
const incognitoContext = await browser.newContext();
49+
await incognitoContext.clearCookies();
50+
const incognitoPage = await incognitoContext.newPage();
51+
await incognitoPage.goto("/", { waitUntil: "domcontentloaded" });
52+
53+
// Verify banner
54+
const logo = incognitoPage.locator("img");
55+
await expect(logo).toHaveAttribute("src", imageLink);
56+
57+
// Shut down browser
58+
await incognitoPage.close();
59+
await browser.close();
2960
});

0 commit comments

Comments
 (0)