Skip to content

Commit 116dc89

Browse files
committed
fix(FR-752): e2e for showNonInstalledImages and login (#3443)
Resolves #3444 (FR-752) # Update E2E tests for UI changes This PR updates E2E tests to reflect recent UI changes: 1. Improves the test description for `showNonInstalledImages` to better describe its functionality 2. Updates element selectors to be more precise: - Uses `exact: true` for the Environments text selector - Replaces the icon selector with a more reliable button selector for "Start Session" 3. Updates login test to reflect that users are now redirected to the `/start` page instead of `/summary` after login **Checklist:** - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
1 parent 664865a commit 116dc89

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

e2e/config.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ test.describe.parallel('config.toml', () => {
5353
);
5454

5555
test(
56-
'showNonInstalledImages',
56+
'showNonInstalledImages: Allow users to select non-installed images when creating sessions',
5757
{ tag: ['@session'] },
5858
async ({ page, context, request }) => {
5959
// modify config.toml to show non-installed images
@@ -66,7 +66,10 @@ test.describe.parallel('config.toml', () => {
6666

6767
await loginAsAdmin(page);
6868

69-
await page.getByRole('group').getByText('Environments').click();
69+
await page
70+
.getByRole('group')
71+
.getByText('Environments', { exact: true })
72+
.click();
7073
await page
7174
.getByRole('columnheader', { name: 'Status' })
7275
.locator('div')
@@ -81,7 +84,8 @@ test.describe.parallel('config.toml', () => {
8184
).jsonValue();
8285

8386
await page.goto(webuiEndpoint);
84-
await page.getByLabel('power_settings_new').click();
87+
// await page.getByLabel('power_settings_new').click();
88+
await page.getByRole('button', { name: 'Start Session' }).first().click();
8589
await page
8690
.getByRole('button', { name: '2 Environments & Resource' })
8791
.click();

e2e/login.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ test.describe('Login using the admin account', () => {
1919
});
2020

2121
test('should redirect to the Summary', async ({ page }) => {
22-
await expect(page).toHaveURL(/\/summary/);
22+
await expect(page).toHaveURL(/\/start/);
2323
await expect(
24-
page.getByTestId('webui-breadcrumb').getByText('Summary'),
24+
page.getByTestId('webui-breadcrumb').getByText('Start'),
2525
).toBeVisible();
2626
});
2727
});

0 commit comments

Comments
 (0)