mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
Set location hash if query parameters or path have changed (#7306)
* refactor to es6 class * change URL on path or params change * add test for url * put into edit mode for test * es6 module export * a11y: add `status` role to clock component * a11y: add label to overlay * a11y: update roles for search results * a11y: add `dialog` role and label for PreviewContainer * refactor(e2e): get rid of a bunch of `page.locator()`s * refactor(e2e): spruce up locators * test: fix unit tests * fix tests with new aria labels * fix tests with new aria labels * fix tests with new aria labels --------- Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
This commit is contained in:
@ -185,16 +185,20 @@ test.describe('Notebook Tests with CouchDB @couchdb', () => {
|
||||
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').click();
|
||||
//Partial match for "Science" should only return Science
|
||||
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('Sc');
|
||||
await expect(page.locator('[aria-label="Search Result"]').first()).toContainText('Science');
|
||||
await expect(page.locator('[aria-label="Search Result"]').first()).not.toContainText('Driving');
|
||||
await expect(page.locator('[aria-label="Search Result"]').first()).not.toContainText(
|
||||
await expect(page.locator('[aria-label="Annotation Search Result"]').first()).toContainText(
|
||||
'Science'
|
||||
);
|
||||
await expect(page.locator('[aria-label="Annotation Search Result"]').first()).not.toContainText(
|
||||
'Driving'
|
||||
);
|
||||
await expect(page.locator('[aria-label="Annotation Search Result"]').first()).not.toContainText(
|
||||
'Drilling'
|
||||
);
|
||||
|
||||
//Searching for a tag which does not exist should return an empty result
|
||||
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').click();
|
||||
await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('Xq');
|
||||
await expect(page.locator('text=No results found')).toBeVisible();
|
||||
await expect(page.getByText('No results found')).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user