Skip to content

Commit 3550046

Browse files
committed
Add E2E test to catch 400 errors due to double stringification
1 parent 5f4b4bb commit 3550046

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

e2e/tests/functional/plugins/plot/tagging.e2e.spec.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,35 @@ test.describe('Plot Tagging', () => {
118118
await basicTagsTests(page);
119119
});
120120

121+
test('Plots use index to retrieve tags @couchdb @network', async ({ page }) => {
122+
test.info().annotations.push({
123+
type: 'issue',
124+
description: 'https://github.com/nasa/openmct/issues/8184'
125+
});
126+
// Switch to real-time mode
127+
await setRealTimeMode(page);
128+
129+
const tagsRequestPromise = new Promise((resolve) => {
130+
page.on('request', async (request) => {
131+
const isTagsRequest = request.url().endsWith('by_keystring');
132+
if (isTagsRequest) {
133+
const response = await request.response();
134+
resolve(response.status() === 200);
135+
}
136+
});
137+
});
138+
await createDomainObjectWithDefaults(page, {
139+
type: 'Sine Wave Generator'
140+
});
141+
142+
const pauseButton = page.getByLabel('Pause incoming real-time data');
143+
pauseButton.click();
144+
145+
const didUseIndexForTagsRequest = await tagsRequestPromise;
146+
147+
expect(didUseIndexForTagsRequest).toBe(true);
148+
});
149+
121150
test('Tags work with Stacked Plots', async ({ page }) => {
122151
const stackedPlot = await createDomainObjectWithDefaults(page, {
123152
type: 'Stacked Plot'

0 commit comments

Comments
 (0)