Skip to content

Commit b476d1e

Browse files
authored
Increase priority of operator status indicator (#8257)
* Increase priority of operator status indicator * Add additional assertion to ensure there are multiple indicators * Added some assertions to tighten up the test
1 parent 97bd576 commit b476d1e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,20 @@ test.describe('Operator Status', () => {
158158
expect(updatedRowValuesArr[COLUMN_STATUS_INDEX]).toEqual(UNSET_VALUE_LABEL);
159159
});
160160

161+
test('Poll indicator is visible when window is really small', async ({ page }) => {
162+
const pollIndicator = page.locator('div[title="Set my operator status"]');
163+
//Make window narrow
164+
await page.setViewportSize({ width: 640, height: 480 });
165+
await page.getByLabel('Display as single line').click();
166+
const indicatorsCount = await page.locator('.c-indicator').count();
167+
//Assert that multiple indicators are active
168+
expect(indicatorsCount).toBeGreaterThanOrEqual(3);
169+
//Assert that indicators are expanded
170+
await expect(page.locator('.l-shell__head')).toContainClass('l-shell__head--expanded');
171+
//Expect poll indicator to be visible
172+
await expect(pollIndicator).toBeInViewport({ ratio: 1 });
173+
});
174+
161175
test.fixme('iterate through all possible response values', async ({ page }) => {
162176
// test all possible response values for the poll
163177
});

src/plugins/operatorStatus/operatorStatus/OperatorStatusIndicator.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*****************************************************************************/
2222
import mount from 'utils/mount';
2323

24+
import PRIORITIES from '../../../api/priority/PriorityAPI.js';
2425
import AbstractStatusIndicator from '../AbstractStatusIndicator.js';
2526
import OperatorStatusComponent from './OperatorStatus.vue';
2627

@@ -62,6 +63,7 @@ export default class OperatorStatusIndicator extends AbstractStatusIndicator {
6263
operatorIndicator.element.classList.add('c-indicator--operator-status');
6364
operatorIndicator.element.classList.add('no-minify');
6465
operatorIndicator.on('click', this.showPopup);
66+
operatorIndicator.priority = PRIORITIES.HIGHEST;
6567

6668
return operatorIndicator;
6769
}

0 commit comments

Comments
 (0)