test(admin/e2e): Update DHC test to catch host issue (#1648)
This commit is contained in:
1 parent
f5cb07248d
commit
a0fe6c86f6
1 file changed
+28
@@ -63,6 +63,7 @@ test.describe('AWS', async () => {
|
|||||||
.getByRole('link', { name: hostCatalogName })
|
.getByRole('link', { name: hostCatalogName })
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|
||||||
|
// Create first host set
|
||||||
const hostSetName1 = 'Host Set ' + nanoid();
|
const hostSetName1 = 'Host Set ' + nanoid();
|
||||||
await page.getByRole('link', { name: 'Host Sets' }).click();
|
await page.getByRole('link', { name: 'Host Sets' }).click();
|
||||||
await page.getByRole('link', { name: 'New', exact: true }).click();
|
await page.getByRole('link', { name: 'New', exact: true }).click();
|
||||||
@@ -94,6 +95,7 @@ test.describe('AWS', async () => {
|
|||||||
.getByRole('link', { name: 'Hosts' })
|
.getByRole('link', { name: 'Hosts' })
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|
||||||
|
// Check number of hosts in host set
|
||||||
let i = 0;
|
let i = 0;
|
||||||
let rowCount = 0;
|
let rowCount = 0;
|
||||||
let hostsAreVisible = false;
|
let hostsAreVisible = false;
|
||||||
@@ -127,6 +129,31 @@ test.describe('AWS', async () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Navigate to each host in the host set
|
||||||
|
for (let i = 0; i < expectedHosts.length; i++) {
|
||||||
|
const host = await page
|
||||||
|
.getByRole('table')
|
||||||
|
.getByRole('rowgroup')
|
||||||
|
.nth(1)
|
||||||
|
.getByRole('row')
|
||||||
|
.nth(i)
|
||||||
|
.getByRole('link');
|
||||||
|
|
||||||
|
let hostName = await host.innerText();
|
||||||
|
await host.click();
|
||||||
|
await expect(
|
||||||
|
page
|
||||||
|
.getByRole('navigation', { name: 'breadcrumbs' })
|
||||||
|
.getByRole('link', { name: hostName })
|
||||||
|
).toBeVisible();
|
||||||
|
|
||||||
|
await page
|
||||||
|
.getByRole('navigation', { name: 'breadcrumbs' })
|
||||||
|
.getByRole('link', { name: hostSetName1 })
|
||||||
|
.click();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create second host set
|
||||||
const hostSetName2 = 'Host Set ' + nanoid();
|
const hostSetName2 = 'Host Set ' + nanoid();
|
||||||
await page
|
await page
|
||||||
.getByRole('navigation', { name: 'breadcrumbs' })
|
.getByRole('navigation', { name: 'breadcrumbs' })
|
||||||
@@ -155,6 +182,7 @@ test.describe('AWS', async () => {
|
|||||||
.getByRole('link', { name: hostSetName2 })
|
.getByRole('link', { name: hostSetName2 })
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|
||||||
|
// Check number of hosts in host set
|
||||||
await page.getByRole('link', { name: 'Hosts' }).click();
|
await page.getByRole('link', { name: 'Hosts' }).click();
|
||||||
i = 0;
|
i = 0;
|
||||||
rowCount = 0;
|
rowCount = 0;
|
||||||
|
|||||||
Reference in new issue
Block a user