Skip to content

Commit 915b5f0

Browse files
committed
Update e2e tests in RHDH for bulk import UI changes
1 parent 4bd1ff1 commit 915b5f0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,32 @@ spec:
8080
);
8181
});
8282

83+
test('should render bulk import page with source control options, search, and repositories table', async () => {
84+
await uiHelper.openSidebar("Bulk import");
85+
await uiHelper.verifyHeading('Bulk import');
86+
await expect(page.getByText('Import to Red Hat Developer')).toHaveAttribute('aria-expanded', 'true');
87+
await page.getByRole('button', { name: 'Import to Red Hat Developer' }).click();
88+
await expect(page.getByText('Import to Red Hat Developer')).toHaveAttribute('aria-expanded', 'false');
89+
await expect(page.getByText('Source control tool', {exact: true})).toBeVisible();
90+
await page.getByTestId('HelpOutlineIcon').hover();
91+
await expect(page.getByRole('tooltip', {name: 'Importing requires approval.'})).toBeVisible();
92+
await expect(page.getByRole('radio', { name: 'GitHub' })).toBeChecked();
93+
await page.getByRole('radio', { name: 'GitLab' }).check();
94+
await expect(page.getByRole('radio', { name: 'GitLab' })).toBeChecked();
95+
await page.getByRole('radio', { name: 'GitHub' }).check();
96+
await expect(page.getByRole('article')).toMatchAriaSnapshot(`
97+
- table:
98+
- rowgroup:
99+
- row "select all repositories Name URL Organization Status":
100+
- columnheader "select all repositories Name":
101+
- checkbox "select all repositories"
102+
- text: Name
103+
- columnheader "URL"
104+
- columnheader "Organization"
105+
- columnheader "Status"
106+
`);
107+
});
108+
83109
// TODO: https://issues.redhat.com/browse/RHDHBUGS-2230
84110
// Select two repos: one with an existing catalog.yaml file and another without it
85111
test.fixme("Add a Repository from the Repository Tab and Confirm its Preview", async () => {

0 commit comments

Comments
 (0)