-
Notifications
You must be signed in to change notification settings - Fork 212
Expand file tree
/
Copy pathhomepage.spec.js
More file actions
30 lines (24 loc) · 974 Bytes
/
homepage.spec.js
File metadata and controls
30 lines (24 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
* Copyright (c) 2023, Salesforce, Inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
const { test, expect } = require("@playwright/test");
const config = require("../config");
const {answerConsentTrackingForm} = require("../scripts/pageHelpers.js")
test.describe("Retail app home page loads", () => {
test.beforeEach(async ({ page }) => {
await page.goto(config.RETAIL_APP_HOME);
await answerConsentTrackingForm(page);
});
test("has title", async ({ page }) => {
await expect(page).toHaveTitle(/Home Page/);
});
test("get started link", async ({ page }) => {
await page.getByRole("link", { name: "Get started" }).click();
const getStartedPage = await page.waitForEvent("popup");
await getStartedPage.waitForLoadState();
await expect(getStartedPage).toHaveURL(/.*getting-started/);
});
});