diff --git a/_playwright-tests/UI/PopularRepo.spec.ts b/_playwright-tests/UI/PopularRepo.spec.ts index ad0d08469..d34905082 100644 --- a/_playwright-tests/UI/PopularRepo.spec.ts +++ b/_playwright-tests/UI/PopularRepo.spec.ts @@ -3,6 +3,7 @@ import { navigateToRepositories } from './helpers/navHelpers'; import { closePopupsIfExist, getRowByNameOrUrl } from './helpers/helpers'; import { deleteAllPopularRepos } from './helpers/deletePopularRepositories'; +const repoName10 = 'EPEL 10 Everything x86_64'; const repoName9 = 'EPEL 9 Everything x86_64'; const repoName8 = 'EPEL 8 Everything x86_64'; @@ -21,25 +22,40 @@ test.describe('Popular Repositories', () => { await expect(page.getByRole('button', { name: 'Add selected repositories' })).toBeVisible(); }); - await test.step('Select EPEL 9', async () => { + await test.step('Select EPEL 10', async () => { await page - .getByRole('row', { name: repoName9 }) + .getByRole('row', { name: repoName10 }) .getByLabel('Select row 0', { exact: true }) .click(); await page.getByTestId('add-selected-dropdown-toggle-no-snap'); await page.getByRole('menuitem', { name: 'Add 1 repositories without snapshotting' }); }); + await test.step('Select EPEL 9', async () => { + await page + .getByRole('row', { name: repoName9 }) + .getByLabel('Select row 1', { exact: true }) + .click(); + await page.getByTestId('add-selected-dropdown-toggle-no-snap'); + await page.getByRole('menuitem', { name: 'Add 2 repositories without snapshotting' }); + }); + await test.step('Select EPEL 8 and add both repos', async () => { await page .getByRole('row', { name: repoName8 }) - .getByLabel('Select row 1', { exact: true }) + .getByLabel('Select row 2', { exact: true }) .click(); await page.getByTestId('add-selected-dropdown-toggle-no-snap').click(); - await page.getByRole('menuitem', { name: 'Add 2 repositories without snapshotting' }).click(); + await page.getByRole('menuitem', { name: 'Add 3 repositories without snapshotting' }).click(); }); await test.step('Check buttons have changed from Add to Remove', async () => { + await expect( + page + .getByRole('row', { name: repoName10 }) + .getByTestId('remove_popular_repo') + .getByText('Remove'), + ).toBeVisible(); await expect( page .getByRole('row', { name: repoName8 }) @@ -83,6 +99,20 @@ test.describe('Popular Repositories', () => { await test.step('Use kebab menu to delete a repo', async () => { const row = await getRowByNameOrUrl(page, repoName9); await row.getByRole('checkbox', { name: 'Select row' }).check(); + + await page.getByTestId('custom_repositories_kebab_toggle').click(); + await page.getByRole('menuitem', { name: 'Remove 1 repositories' }).click(); + // Confirm the removal in the pop-up + await page + .getByRole('dialog', { name: 'Remove repositories?' }) + .getByRole('button', { name: 'Remove' }) + .click(); + }); + + await test.step('Use kebab menu to delete a repo', async () => { + const row = await getRowByNameOrUrl(page, repoName10); + await row.getByRole('checkbox', { name: 'Select row' }).check(); + await page.getByTestId('custom_repositories_kebab_toggle').click(); await page.getByRole('menuitem', { name: 'Remove 1 repositories' }).click(); // Confirm the removal in the pop-up diff --git a/src/Pages/Templates/TemplatesTable/components/AddTemplate/AddTemplate.tsx b/src/Pages/Templates/TemplatesTable/components/AddTemplate/AddTemplate.tsx index fe5e76dee..f45d3594e 100644 --- a/src/Pages/Templates/TemplatesTable/components/AddTemplate/AddTemplate.tsx +++ b/src/Pages/Templates/TemplatesTable/components/AddTemplate/AddTemplate.tsx @@ -143,7 +143,7 @@ const AddTemplateBase = () => { , ({ value: label, children: name })); const allowedDistributionVersions = distribution_versions - .filter(({ label }) => ['8', '9'].includes(label)) + .filter(({ label }) => ['8', '9', '10'].includes(label)) .map(({ label, name }) => ({ value: label, children: name })); return ( diff --git a/src/Pages/Templates/TemplatesTable/components/templateHelpers.ts b/src/Pages/Templates/TemplatesTable/components/templateHelpers.ts index 552f35ef2..5fb2637b0 100644 --- a/src/Pages/Templates/TemplatesTable/components/templateHelpers.ts +++ b/src/Pages/Templates/TemplatesTable/components/templateHelpers.ts @@ -16,6 +16,11 @@ export const hardcodeRedHatReposByArchAndVersion = ( 'https://cdn.redhat.com/content/dist/rhel9/9/x86_64/appstream/os', 'https://cdn.redhat.com/content/dist/rhel9/9/x86_64/baseos/os', ]; + case arch === 'x86_64' && version === '10': + return [ + 'https://cdn.redhat.com/content/dist/rhel10/10/x86_64/appstream/os', + 'https://cdn.redhat.com/content/dist/rhel10/10/x86_64/baseos/os', + ]; case arch === 'aarch64' && version === '8': return [ 'https://cdn.redhat.com/content/dist/rhel8/8/aarch64/appstream/os', @@ -26,6 +31,11 @@ export const hardcodeRedHatReposByArchAndVersion = ( 'https://cdn.redhat.com/content/dist/rhel9/9/aarch64/appstream/os', 'https://cdn.redhat.com/content/dist/rhel9/9/aarch64/baseos/os', ]; + case arch === 'aarch64' && version === '10': + return [ + 'https://cdn.redhat.com/content/dist/rhel10/10/aarch64/appstream/os', + 'https://cdn.redhat.com/content/dist/rhel10/10/aarch64/baseos/os', + ]; default: return;