mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
Fix test flake and playwright version in couchdb circleci test (#6608)
* test: wait for `domcontentloaded` on reload * chore: playwright `1.32.3` in circleci couchdb test * test: simplify(why was this creating a clock??)
This commit is contained in:
parent
5610846147
commit
ddeeff4822
@ -162,7 +162,7 @@ jobs:
|
||||
steps:
|
||||
- build_and_install:
|
||||
node-version: <<parameters.node-version>>
|
||||
- run: npx playwright@1.29.0 install #Necessary for bare ubuntu machine
|
||||
- run: npx playwright@1.32.3 install #Necessary for bare ubuntu machine
|
||||
- run: |
|
||||
export $(cat src/plugins/persistence/couch/.env.ci | xargs)
|
||||
docker-compose -f src/plugins/persistence/couch/couchdb-compose.yaml up --detach
|
||||
|
@ -227,35 +227,11 @@ test.describe('Tagging in Notebooks @addInit', () => {
|
||||
//Go to baseURL
|
||||
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
||||
|
||||
const clock = await createDomainObjectWithDefaults(page, { type: 'Clock' });
|
||||
|
||||
const ITERATIONS = 4;
|
||||
const notebook = await createNotebookEntryAndTags(page, ITERATIONS);
|
||||
await page.goto(notebook.url);
|
||||
|
||||
for (let iteration = 0; iteration < ITERATIONS; iteration++) {
|
||||
const entryLocator = `[aria-label="Notebook Entry"] >> nth = ${iteration}`;
|
||||
await expect(page.locator(entryLocator)).toContainText("Science");
|
||||
await expect(page.locator(entryLocator)).toContainText("Driving");
|
||||
}
|
||||
|
||||
await Promise.all([
|
||||
page.waitForNavigation(),
|
||||
page.goto('./#/browse/mine?hideTree=false'),
|
||||
page.click('.c-disclosure-triangle')
|
||||
]);
|
||||
|
||||
const treePane = page.getByRole('tree', {
|
||||
name: 'Main Tree'
|
||||
});
|
||||
// Click Clock
|
||||
await treePane.getByRole('treeitem', {
|
||||
name: clock.name
|
||||
}).click();
|
||||
// Click Notebook
|
||||
await page.getByRole('treeitem', {
|
||||
name: notebook.name
|
||||
}).click();
|
||||
|
||||
// Verify tags are present
|
||||
for (let iteration = 0; iteration < ITERATIONS; iteration++) {
|
||||
const entryLocator = `[aria-label="Notebook Entry"] >> nth = ${iteration}`;
|
||||
await expect(page.locator(entryLocator)).toContainText("Science");
|
||||
@ -263,14 +239,9 @@ test.describe('Tagging in Notebooks @addInit', () => {
|
||||
}
|
||||
|
||||
//Reload Page
|
||||
await Promise.all([
|
||||
page.reload(),
|
||||
page.waitForLoadState('networkidle')
|
||||
]);
|
||||
|
||||
// Click Notebook
|
||||
await page.click(`text="${notebook.name}"`);
|
||||
await page.reload({ waitUntil: 'domcontentloaded' });
|
||||
|
||||
// Verify tags persist across reload
|
||||
for (let iteration = 0; iteration < ITERATIONS; iteration++) {
|
||||
const entryLocator = `[aria-label="Notebook Entry"] >> nth = ${iteration}`;
|
||||
await expect(page.locator(entryLocator)).toContainText("Science");
|
||||
|
Loading…
Reference in New Issue
Block a user