test(visual): add theme to notification banner test name (#6450)

* test(visual): add theme to notification banner test name

* test: rename file

* test: switch to small example plan

* test: snapshot object-view only

* test: fix selectors

* refactor: chain locators together
This commit is contained in:
Jesse Mazzella
2023-04-13 10:02:56 -07:00
committed by GitHub
parent e3ab085dd5
commit a9a98380f2
3 changed files with 24 additions and 13 deletions

View File

@ -58,8 +58,14 @@ async function navigateToFaultManagementWithoutExample(page) {
async function navigateToFaultItemInTree(page) {
await page.goto('./', { waitUntil: 'networkidle' });
// Click text=Fault Management
await page.click('text=Fault Management'); // this verifies the plugin has been added
const faultManagementTreeItem = page.getByRole('tree', {
name: "Main Tree"
}).getByRole('treeitem', {
name: "Fault Management"
});
// Navigate to "Fault Management" from the tree
await faultManagementTreeItem.click();
}
/**
@ -141,8 +147,7 @@ async function clearSearch(page) {
* @param {import('@playwright/test').Page} page
*/
async function selectFaultItem(page, rowNumber) {
// eslint-disable-next-line playwright/no-force-option
await page.check(`.c-fault-mgmt-item > input >> nth=${rowNumber - 1}`, { force: true }); // this will not work without force true, saw this may be a pw bug
await page.locator(`.c-fault-mgmt-item > input >> nth=${rowNumber - 1}`).check();
}
/**