Skip to content

Commit ca7ceea

Browse files
authored
add header test (#875)
1 parent 02d2e1c commit ca7ceea

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

workspaces/sandbox/packages/app/e2e-tests/app.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,23 @@ test.describe('sandbox plugin', () => {
5555
`);
5656
});
5757

58+
// Test Header
59+
test('Test Header', async () => {
60+
// Opens and verifies that 'Red Hat Developer Hub' popup is not broken
61+
const [rhdhPage] = await Promise.all([
62+
page.waitForEvent('popup'),
63+
page.getByRole('link', { name: 'Red Hat Developer Hub , Opens' }).click(),
64+
]);
65+
await expect(rhdhPage.locator('h1')).toContainText('Red Hat Developer Hub');
66+
67+
// Opens and verifies that 'Contact Red Hat Sales' popup is not broken
68+
const [salesPage] = await Promise.all([
69+
page.waitForEvent('popup'),
70+
page.getByRole('button', { name: 'Contact Red Hat Sales' }).click(),
71+
]);
72+
await expect(salesPage.locator('h1')).toContainText('Contact Red Hat');
73+
});
74+
5875
test('Signup user and home page verification', async () => {
5976
const articleHeader = page.getByRole('article');
6077
const loadingIcon = page.locator('svg.v5-MuiCircularProgress-svg').first();

0 commit comments

Comments
 (0)