Skip to content

Commit e21fc78

Browse files
regexowlkingsleyzissou
authored andcommitted
playwright: Update boot tests after Repositories revamp
This updates the boot tests to use new repositories locators.
1 parent f5c8ecc commit e21fc78

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

playwright/BootTests/Content/ContentNonRepeatable.boot.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ test('Content integration test - Non repeatable build - URL source', async ({
8787
await frame
8888
.getByRole('textbox', { name: 'Filter repositories' })
8989
.fill(repositoryName);
90-
// Wait for the repository to be filtered by checking theres only one item in the list
91-
await expect(frame.getByRole('button', { name: '- 1 of 1' })).toBeVisible();
92-
await frame.getByRole('checkbox', { name: 'Select row 0' }).click();
90+
await frame.getByRole('option', { name: repositoryName }).click();
9391
});
9492

9593
await test.step('Select the package', async () => {
@@ -228,13 +226,12 @@ test('Content integration test - Non repeatable build - Upload source', async ({
228226
await frame
229227
.getByRole('textbox', { name: 'Filter repositories' })
230228
.fill(repositoryName);
231-
// Wait for the repository to be filtered by checking theres only one item in the list
232-
await expect(frame.getByRole('button', { name: '- 1 of 1' })).toBeVisible();
233-
// Make sure the repository is not pending anymore and is ready
234-
await expect(frame.getByRole('gridcell', { name: 'Valid' })).toBeVisible({
229+
await expect(
230+
frame.getByRole('option', { name: repositoryName }),
231+
).toBeEnabled({
235232
timeout: 180000,
236233
});
237-
await frame.getByRole('checkbox', { name: 'Select row 0' }).click();
234+
await frame.getByRole('option', { name: repositoryName }).click();
238235
});
239236

240237
await test.step('Select the package', async () => {
@@ -336,9 +333,7 @@ test('Content integration test - Non repeatable build - Community repository', a
336333
await frame
337334
.getByRole('textbox', { name: 'Filter repositories' })
338335
.fill(repositoryName);
339-
// Wait for the repository to be filtered by checking theres only one item in the list
340-
await expect(frame.getByRole('button', { name: '- 1 of 1' })).toBeVisible();
341-
await frame.getByRole('checkbox', { name: 'Select row 0' }).click();
336+
await frame.getByRole('option', { name: repositoryName }).click();
342337
});
343338

344339
await test.step('Select the package', async () => {

playwright/BootTests/Content/ContentRepeatable.boot.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ test('Content integration test - Repeatable build - URL source', async ({
143143
await frame
144144
.getByRole('textbox', { name: 'Filter repositories' })
145145
.fill(repositoryName);
146-
await expect(frame.getByRole('button', { name: '- 1 of 1' })).toBeVisible();
147-
await frame.getByRole('checkbox', { name: 'Select row 0' }).click();
146+
await frame.getByRole('option', { name: repositoryName }).click();
148147
});
149148

150149
await test.step('Select the package', async () => {

0 commit comments

Comments
 (0)