Skip to content

Commit 58239b5

Browse files
committed
Adding method for template creation process
1 parent 0c9e416 commit 58239b5

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

_playwright-tests/UI/Templates.spec.ts

+22-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,27 @@ test.describe('Templates', () => {
88
}) => {
99
await navigateToTemplates(page);
1010
await closePopupsIfExist(page);
11-
12-
const AddButton = page.locator('[data-ouia-component-id="create_content_template"]');
13-
14-
// Wait for the Add button to become enabled (up to 10 seconds)
15-
await AddButton.first().isEnabled({ timeout: 10000 });
11+
await page.getByRole('button', { name: 'Add content template' }).click();
12+
const architectureFilterButton = page.getByRole('button', { name: 'Select architecture' });
13+
await architectureFilterButton.click()
14+
await page.getByRole('option', { name: 'x86_64' }).click();
15+
const versionFilterButton = page.getByRole('button', { name: 'Select version' });
16+
await versionFilterButton.click();
17+
await page.getByRole('menuitem', { name: 'el8' }).locator('label').click();
18+
await page.getByRole('button', { name: 'Next' }).click();
19+
// select Red hat repos Checkbox optional
20+
await page.getByRole('button', { name: 'Next' }).click();
21+
// select checkbox for cutom repo optional
22+
page.getByRole('button', { name: 'Next' }).click();
23+
await page.getByRole('radio', { name: 'use-latest-snapshot' }).fill('True');
24+
page.getByRole('button', { name: 'Next' }).click();
25+
const nameInput = page.getByPlaceholder('Enter name');
26+
const descriptionInput = page.getByPlaceholder('Enter Description'); //optional
27+
await nameInput.fill('demo_template');
28+
await descriptionInput.fill('test'); // optional
29+
page.getByRole('button', { name: 'Next' }).click();
30+
// teamplate with system
31+
page.getByRole('button').locator('pf-v5-c-menu-toggle__button');
32+
page.getByRole('button', { name: 'Create template only' }).click();
1633
});
1734
});

0 commit comments

Comments
 (0)