mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 13:43:09 +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:
|
steps:
|
||||||
- build_and_install:
|
- build_and_install:
|
||||||
node-version: <<parameters.node-version>>
|
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: |
|
- run: |
|
||||||
export $(cat src/plugins/persistence/couch/.env.ci | xargs)
|
export $(cat src/plugins/persistence/couch/.env.ci | xargs)
|
||||||
docker-compose -f src/plugins/persistence/couch/couchdb-compose.yaml up --detach
|
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
|
//Go to baseURL
|
||||||
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
||||||
|
|
||||||
const clock = await createDomainObjectWithDefaults(page, { type: 'Clock' });
|
|
||||||
|
|
||||||
const ITERATIONS = 4;
|
const ITERATIONS = 4;
|
||||||
const notebook = await createNotebookEntryAndTags(page, ITERATIONS);
|
const notebook = await createNotebookEntryAndTags(page, ITERATIONS);
|
||||||
|
await page.goto(notebook.url);
|
||||||
|
|
||||||
for (let iteration = 0; iteration < ITERATIONS; iteration++) {
|
// Verify tags are present
|
||||||
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();
|
|
||||||
|
|
||||||
for (let iteration = 0; iteration < ITERATIONS; iteration++) {
|
for (let iteration = 0; iteration < ITERATIONS; iteration++) {
|
||||||
const entryLocator = `[aria-label="Notebook Entry"] >> nth = ${iteration}`;
|
const entryLocator = `[aria-label="Notebook Entry"] >> nth = ${iteration}`;
|
||||||
await expect(page.locator(entryLocator)).toContainText("Science");
|
await expect(page.locator(entryLocator)).toContainText("Science");
|
||||||
@ -263,14 +239,9 @@ test.describe('Tagging in Notebooks @addInit', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Reload Page
|
//Reload Page
|
||||||
await Promise.all([
|
await page.reload({ waitUntil: 'domcontentloaded' });
|
||||||
page.reload(),
|
|
||||||
page.waitForLoadState('networkidle')
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Click Notebook
|
|
||||||
await page.click(`text="${notebook.name}"`);
|
|
||||||
|
|
||||||
|
// Verify tags persist across reload
|
||||||
for (let iteration = 0; iteration < ITERATIONS; iteration++) {
|
for (let iteration = 0; iteration < ITERATIONS; iteration++) {
|
||||||
const entryLocator = `[aria-label="Notebook Entry"] >> nth = ${iteration}`;
|
const entryLocator = `[aria-label="Notebook Entry"] >> nth = ${iteration}`;
|
||||||
await expect(page.locator(entryLocator)).toContainText("Science");
|
await expect(page.locator(entryLocator)).toContainText("Science");
|
||||||
|
Loading…
Reference in New Issue
Block a user