Skip to content

Commit 32f4b75

Browse files
committed
Merge branch 'master' of https://github.com/nasa/openmct into telemetry-comps
2 parents b25e003 + 670449a commit 32f4b75

16 files changed

Lines changed: 460 additions & 373 deletions

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@
486486
"SSSZ",
487487
"pageerror",
488488
"annotatable",
489+
"requestfinished",
489490
"LOCF"
490491
],
491492
"dictionaries": ["npm", "softwareTerms", "node", "html", "css", "bash", "en_US", "en-gb", "misc"],

.github/workflows/e2e-couchdb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
username: ${{ secrets.DOCKERHUB_USERNAME }}
3232
password: ${{ secrets.DOCKERHUB_TOKEN }}
3333

34-
- run: npx playwright@1.48.1 install
34+
- run: npx playwright@1.57.0 install
3535

3636
- name: Start CouchDB Docker Container and Init with Setup Scripts
3737
run: |

.github/workflows/e2e-full.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: 'e2e-full'
22
on:
33
push:
4-
branches: master
4+
branches:
5+
- master
56
workflow_dispatch:
67
pull_request:
78
types:
@@ -33,7 +34,7 @@ jobs:
3334
restore-keys: |
3435
${{ runner.os }}-node-
3536
36-
- run: npx playwright@1.47.2 install
37+
- run: npx playwright@1.57.0 install
3738
- run: npx playwright install chrome-beta
3839
- run: npm ci --no-audit --progress=false
3940
- run: npm run test:e2e:full -- --max-failures=40

.github/workflows/e2e-perf.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: 'e2e-perf'
22
on:
33
push:
4-
branches: master
4+
branches:
5+
- master
56
workflow_dispatch:
67
pull_request:
78
types:
@@ -28,7 +29,7 @@ jobs:
2829
restore-keys: |
2930
${{ runner.os }}-node-
3031
31-
- run: npx playwright@1.48.1 install
32+
- run: npx playwright@1.57.0 install
3233
- run: npm ci --no-audit --progress=false
3334
- run: npm run test:perf:localhost
3435
- run: npm run test:perf:contract

.github/workflows/pr-platform.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: 'pr-platform'
22
on:
33
push:
4-
branches: master
4+
branches:
5+
- master
56
workflow_dispatch:
67
pull_request:
78
types:

.github/workflows/pr.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
jobs:
1919
generate_cache_key:
2020
runs-on: ubuntu-latest
21-
container: mcr.microsoft.com/playwright:v1.48.1-jammy
21+
container: mcr.microsoft.com/playwright:v1.57.0-jammy
2222
steps:
2323
- uses: actions/checkout@v4
2424
- id: generate_cache_key
@@ -30,7 +30,7 @@ jobs:
3030
build_and_cache_dependencies_if_needed:
3131
needs: generate_cache_key
3232
runs-on: ubuntu-latest
33-
container: mcr.microsoft.com/playwright:v1.48.1-jammy
33+
container: mcr.microsoft.com/playwright:v1.57.0-jammy
3434
steps:
3535
- uses: actions/checkout@v4
3636
- uses: actions/setup-node@v4
@@ -79,7 +79,7 @@ jobs:
7979
needs:
8080
- build_and_cache_dependencies_if_needed
8181
runs-on: ubuntu-latest
82-
container: mcr.microsoft.com/playwright:v1.48.1-jammy
82+
container: mcr.microsoft.com/playwright:v1.57.0-jammy
8383
steps:
8484
- uses: actions/checkout@v4
8585
- uses: actions/setup-node@v4
@@ -152,7 +152,7 @@ jobs:
152152
e2e-test:
153153
name: e2e-ci (shard ${{ matrix.shard }}/4)
154154
runs-on: ubuntu-latest
155-
container: mcr.microsoft.com/playwright:v1.48.1-jammy
155+
container: mcr.microsoft.com/playwright:v1.57.0-jammy
156156
strategy:
157157
fail-fast: false
158158
matrix:
@@ -218,7 +218,7 @@ jobs:
218218
visual-a11y:
219219
name: visual-a11y-ci
220220
runs-on: ubuntu-latest
221-
container: mcr.microsoft.com/playwright:v1.48.1-jammy
221+
container: mcr.microsoft.com/playwright:v1.57.0-jammy
222222
needs:
223223
- build_and_cache_dependencies_if_needed
224224
strategy:
@@ -267,7 +267,7 @@ jobs:
267267
if-no-files-found: warn
268268
perf-test:
269269
runs-on: ubuntu-latest
270-
container: mcr.microsoft.com/playwright:v1.48.1-jammy
270+
container: mcr.microsoft.com/playwright:v1.57.0-jammy
271271
needs:
272272
- build_and_cache_dependencies_if_needed
273273
if: ${{ always() }}
@@ -314,7 +314,7 @@ jobs:
314314
if-no-files-found: warn
315315
mem-test:
316316
runs-on: ubuntu-latest
317-
container: mcr.microsoft.com/playwright:v1.48.1-jammy
317+
container: mcr.microsoft.com/playwright:v1.57.0-jammy
318318
needs:
319319
- build_and_cache_dependencies_if_needed
320320
if: ${{ always() }}

e2e/tests/functional/example/generator/sineWaveLimitProvider.e2e.spec.js

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,36 +47,60 @@ test.describe('Sine Wave Generator', () => {
4747
// Title
4848
await expect(page.locator('.c-form-row__state-indicator').first()).toHaveClass(/req/);
4949

50+
const formLocator = page.locator('.c-form__contents');
51+
5052
// Verify that the Notes row does not have a required indicator
5153
await expect(
52-
page.locator('.c-form__section div:nth-child(3) .form-row .c-form-row__state-indicator')
53-
).not.toContain('.req');
54-
await page.locator('textarea[type="text"]').fill('Optional Note Text');
54+
formLocator.locator('.form-row', { hasText: 'Notes' }).locator('.c-form-row__state-indicator')
55+
).not.toHaveClass(/req/);
56+
await formLocator.locator('textarea[type="text"]').fill('Optional Note Text');
5557

5658
// Period
57-
await expect(page.locator('div:nth-child(4) .c-form-row__state-indicator')).toHaveClass(/req/);
59+
await expect(
60+
formLocator
61+
.locator('.form-row', { hasText: 'Period' })
62+
.locator('.c-form-row__state-indicator')
63+
).toHaveClass(/req/);
5864

5965
// Amplitude
60-
await expect(page.locator('div:nth-child(5) .c-form-row__state-indicator')).toHaveClass(/req/);
66+
await expect(
67+
formLocator
68+
.locator('.form-row', { hasText: 'Amplitude' })
69+
.locator('.c-form-row__state-indicator')
70+
).toHaveClass(/req/);
6171

6272
// Offset
63-
await expect(page.locator('div:nth-child(6) .c-form-row__state-indicator')).toHaveClass(/req/);
73+
await expect(
74+
formLocator
75+
.locator('.form-row', { hasText: 'Offset' })
76+
.locator('.c-form-row__state-indicator')
77+
).toHaveClass(/req/);
6478

6579
// Data Rate
66-
await expect(page.locator('div:nth-child(7) .c-form-row__state-indicator')).toHaveClass(/req/);
80+
await expect(
81+
formLocator
82+
.locator('.form-row', { hasText: 'Data Rate (hz)' })
83+
.locator('.c-form-row__state-indicator')
84+
).toHaveClass(/req/);
6785

6886
// Phase
69-
await expect(page.locator('div:nth-child(8) .c-form-row__state-indicator')).toHaveClass(/req/);
87+
await expect(
88+
formLocator.locator('.form-row', { hasText: 'Phase' }).locator('.c-form-row__state-indicator')
89+
).toHaveClass(/req/);
7090

7191
// Randomness
72-
await expect(page.locator('div:nth-child(9) .c-form-row__state-indicator')).toHaveClass(/req/);
92+
await expect(
93+
formLocator
94+
.locator('.form-row', { hasText: 'Randomness' })
95+
.locator('.c-form-row__state-indicator')
96+
).toHaveClass(/req/);
7397

7498
// Verify that by removing value from required text field shows invalid indicator
7599
await page
76100
.locator(
77101
'text=Properties Title Notes Period Amplitude Offset Data Rate (hz) Phase (radians) Ra >> input[type="text"]'
78102
)
79-
.fill('');
103+
.clear();
80104
await expect(page.locator('.c-form-row__state-indicator').first()).toHaveClass(/invalid/);
81105

82106
// Verify that by adding value to empty required text field changes invalid to valid indicator
@@ -88,7 +112,7 @@ test.describe('Sine Wave Generator', () => {
88112
await expect(page.locator('.c-form-row__state-indicator').first()).toHaveClass(/valid/);
89113

90114
// Verify that by removing value from required number field shows invalid indicator
91-
await page.locator('.field.control.l-input-sm input').first().fill('');
115+
await page.locator('.field.control.l-input-sm input').first().clear();
92116
await expect(page.locator('div:nth-child(4) .c-form-row__state-indicator')).toHaveClass(
93117
/invalid/
94118
);

e2e/tests/functional/planning/timelistControlledClock.e2e.spec.js

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ const examplePlanSmall1 = JSON.parse(
5151
)
5252
);
5353

54-
const TIME_TO_FROM_COLUMN = 2;
55-
const HEADER_ROW = 0;
56-
const NUM_COLUMNS = 5;
54+
const TIME_TO_FROM_COLUMN = 'countdown';
5755

5856
/**
5957
* The regular expression used to parse the countdown string.
@@ -124,44 +122,42 @@ test.describe('Time List with controlled clock @clock', () => {
124122
test('Time List shows current events and counts down correctly in real-time mode', async ({
125123
page
126124
}) => {
127-
const countUpCells = [
128-
getTimeListCellByIndex(page, 1, TIME_TO_FROM_COLUMN),
129-
getTimeListCellByIndex(page, 2, TIME_TO_FROM_COLUMN)
130-
];
131-
const countdownCells = [
132-
getTimeListCellByIndex(page, 3, TIME_TO_FROM_COLUMN),
133-
getTimeListCellByIndex(page, 4, TIME_TO_FROM_COLUMN)
134-
];
125+
const countUpRowsNames = ['Time since the last time I ate', 'Time since last accident'];
126+
const countdownRowsNames = ['Time until birthday', 'Time until supper'];
135127

136128
// Verify that the countdown cells are counting down
137-
for (let i = 0; i < countdownCells.length; i++) {
129+
for (let i = 0; i < countdownRowsNames.length; i++) {
138130
await test.step(`Countdown cell ${i + 1} counts down`, async () => {
139-
const countdownCell = countdownCells[i];
131+
const countdownCell = getTimeListCellByName(
132+
page,
133+
countdownRowsNames[i],
134+
TIME_TO_FROM_COLUMN
135+
);
140136
// Get the initial countdown timestamp object
141-
const beforeCountdown = await getAndAssertCountdownOrUpObject(page, i + 3);
142-
// should not have a '-' sign
143-
await expect(countdownCell).not.toHaveText('-');
137+
const beforeCountdown = await getAndAssertCountdownOrUpObject(page, countdownRowsNames[i]);
138+
// should have a '-' sign BECAUSE IT'S A COUNTDOWN
139+
await expect(countdownCell).toContainText('-');
144140
// Wait until it changes
145-
await expect(countdownCell).not.toHaveText(beforeCountdown.toString());
141+
await expect(countdownCell).not.toContainText(beforeCountdown.toString());
146142
// Get the new countdown timestamp object
147-
const afterCountdown = await getAndAssertCountdownOrUpObject(page, i + 3);
143+
const afterCountdown = await getAndAssertCountdownOrUpObject(page, countdownRowsNames[i]);
148144
// Verify that the new countdown timestamp object is less than the old one
149145
expect(Number(afterCountdown.seconds)).toBeLessThan(Number(beforeCountdown.seconds));
150146
});
151147
}
152148

153149
// Verify that the count-up cells are counting up
154-
for (let i = 0; i < countUpCells.length; i++) {
150+
for (let i = 0; i < countUpRowsNames.length; i++) {
155151
await test.step(`Count-up cell ${i + 1} counts up`, async () => {
156-
const countUpCell = countUpCells[i];
152+
const countUpCell = getTimeListCellByName(page, countUpRowsNames[i], TIME_TO_FROM_COLUMN);
157153
// Get the initial count-up timestamp object
158-
const beforeCountUp = await getAndAssertCountdownOrUpObject(page, i + 1);
159-
// should not have a '+' sign
160-
await expect(countUpCell).not.toHaveText('+');
154+
const beforeCountUp = await getAndAssertCountdownOrUpObject(page, countUpRowsNames[i]);
155+
// should have a '+' sign BECAUSE IT'S A COUNTUP
156+
await expect(countUpCell).toContainText('+');
161157
// Wait until it changes
162-
await expect(countUpCell).not.toHaveText(beforeCountUp.toString());
158+
await expect(countUpCell).not.toContainText(beforeCountUp.toString());
163159
// Get the new count-up timestamp object
164-
const afterCountUp = await getAndAssertCountdownOrUpObject(page, i + 1);
160+
const afterCountUp = await getAndAssertCountdownOrUpObject(page, countUpRowsNames[i]);
165161
// Verify that the new count-up timestamp object is greater than the old one
166162
expect(Number(afterCountUp.seconds)).toBeGreaterThan(Number(beforeCountUp.seconds));
167163
});
@@ -202,8 +198,11 @@ test.describe('Activity progress when now is after end of the activity @clock',
202198
* @param {number} columnIndex
203199
* @returns {import('@playwright/test').Locator} cell
204200
*/
205-
function getTimeListCellByIndex(page, rowIndex, columnIndex) {
206-
return page.getByRole('cell').nth(rowIndex * NUM_COLUMNS + columnIndex);
201+
function getTimeListCellByName(page, rowName, columnName) {
202+
const rowLocator = page.getByRole('row', { name: rowName });
203+
const cellLocator = rowLocator.locator(`td.--${columnName}`);
204+
205+
return cellLocator;
207206
}
208207

209208
/**
@@ -213,8 +212,8 @@ function getTimeListCellByIndex(page, rowIndex, columnIndex) {
213212
* @param {number} columnIndex
214213
* @returns {Promise<string>} text
215214
*/
216-
async function getTimeListCellTextByIndex(page, rowIndex, columnIndex) {
217-
const text = await getTimeListCellByIndex(page, rowIndex, columnIndex).innerText();
215+
async function getTimeListCellTextByName(page, rowName, columnName) {
216+
const text = await getTimeListCellByName(page, rowName, columnName).innerText();
218217
return text;
219218
}
220219

@@ -225,12 +224,8 @@ async function getTimeListCellTextByIndex(page, rowIndex, columnIndex) {
225224
* @param {number} rowIndex the row index
226225
* @returns {Promise<CountdownOrUpObject>} The countdown (or countup) object
227226
*/
228-
async function getAndAssertCountdownOrUpObject(page, rowIndex) {
229-
const timeToFrom = await getTimeListCellTextByIndex(
230-
page,
231-
HEADER_ROW + rowIndex,
232-
TIME_TO_FROM_COLUMN
233-
);
227+
async function getAndAssertCountdownOrUpObject(page, rowName) {
228+
const timeToFrom = await getTimeListCellTextByName(page, rowName, TIME_TO_FROM_COLUMN);
234229

235230
expect(timeToFrom).toMatch(COUNTDOWN_REGEXP);
236231
const match = timeToFrom.match(COUNTDOWN_REGEXP);

e2e/tests/functional/plugins/displayLayout/displayLayout.e2e.spec.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ import { expect, test } from '../../../../pluginFixtures.js';
3535
const CHILD_LAYOUT_STORAGE_STATE_PATH = fileURLToPath(
3636
new URL('../../../../test-data/display_layout_with_child_layouts.json', import.meta.url)
3737
);
38+
const TEST_DISPLAY_LAYOUT_ID = {
39+
namespace: '',
40+
key: '712d07f1-3585-465a-a6db-3c40a9edcde7'
41+
};
3842
const CHILD_PLOT_STORAGE_STATE_PATH = fileURLToPath(
3943
new URL('../../../../test-data/display_layout_with_child_overlay_plot.json', import.meta.url)
4044
);
@@ -54,13 +58,16 @@ test.describe('Display Layout Sub-object Actions @localStorage', () => {
5458
test.beforeEach(async ({ page }) => {
5559
await page.goto('./', { waitUntil: 'domcontentloaded' });
5660
await page.getByLabel('Expand My Items folder').click();
57-
const waitForMyItemsNavigation = page.waitForURL(`**/mine/?*`);
61+
const waitForDisplayLayoutNavigation = page.waitForURL(
62+
//eslint-disable-next-line
63+
new RegExp(`.*/${TEST_DISPLAY_LAYOUT_ID.key}/\?.*`)
64+
);
5865
await page
5966
.getByLabel('Main Tree')
6067
.getByLabel('Navigate to Parent Display Layout layout Object')
6168
.click();
6269
// Wait for the URL to change to the display layout
63-
await waitForMyItemsNavigation;
70+
await waitForDisplayLayoutNavigation;
6471
});
6572
test('Open in New Tab action preserves time bounds @2p', async ({ page }) => {
6673
test.info().annotations.push({

0 commit comments

Comments
 (0)