mirror of
https://github.com/nasa/openmct.git
synced 2024-12-22 14:32:22 +00:00
a8fbabe695
* more readable * unpause explicitly * fix jsdoc * e2e testing multiple image removal * prettier * fix to remove multiple images from history * move tests that use playwright clock api into own file * fix playwright clock tests * add aria-label to element * prevent straggler debounced function call on unmount * clean up and fix tests * update paths * lint fix * lint fix --------- Co-authored-by: John Hill <john.c.hill@nasa.gov>
34 lines
984 B
JavaScript
34 lines
984 B
JavaScript
import { createDomainObjectWithDefaults } from '../appActions.js';
|
|
import { expect } from '../pluginFixtures.js';
|
|
|
|
const IMAGE_LOAD_DELAY = 5 * 1000;
|
|
const FIVE_MINUTES = 1000 * 60 * 5;
|
|
const THIRTY_SECONDS = 1000 * 30;
|
|
const MOUSE_WHEEL_DELTA_Y = 120;
|
|
|
|
/**
|
|
* @param {import('@playwright/test').Page} page
|
|
*/
|
|
async function createImageryViewWithShortDelay(page, { name, parent }) {
|
|
await createDomainObjectWithDefaults(page, {
|
|
name,
|
|
type: 'Example Imagery',
|
|
parent
|
|
});
|
|
|
|
await expect(page.locator('.l-browse-bar__object-name')).toContainText('Unnamed Example Imagery');
|
|
await page.getByLabel('More actions').click();
|
|
await page.getByLabel('Edit Properties').click();
|
|
// Clear and set Image load delay to minimum value
|
|
await page.locator('input[type="number"]').fill(`${IMAGE_LOAD_DELAY}`);
|
|
await page.getByLabel('Save').click();
|
|
}
|
|
|
|
export {
|
|
createImageryViewWithShortDelay,
|
|
FIVE_MINUTES,
|
|
IMAGE_LOAD_DELAY,
|
|
MOUSE_WHEEL_DELTA_Y,
|
|
THIRTY_SECONDS
|
|
};
|