mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 16:10:23 +00:00
refactor: migrate to ESM (#7331)
* refactor: move package.json to type: module this is where the fun begins * chore: move webpack common and prod to esm * chore: move webpack to esm, eslint to explicit cjs * refactor: migrate all files to esm * style: lint * refactor: begin moving karma to cjs, use dynamic esm import * refactor: move index-test to cjs * refactor: begin moving e2e to ESM this was manual. I'm committing this because I'm about to try the `cjstoesm` tool * refactor: move all to esm * fix: make all e2e tests use .js imports * refactor: begin moving exports to esm * refactor: use URL transforms instead of __dirname * fix: use libraryExport: default to properly handle openmct * fix: export all playwright configs as modules * refactor: move all instances of __dirname to import.meta.url * refactor: lint, drop unnecessary URL call * fix: use correct URL path on helper/addNoneditableObject.js * fix: more incorrect URL resolve issues * fix: parse json after reading it
This commit is contained in:
@ -19,20 +19,19 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/* global __dirname */
|
||||
const { test, expect } = require('../../../../pluginFixtures');
|
||||
const path = require('path');
|
||||
const {
|
||||
createDomainObjectWithDefaults,
|
||||
setStartOffset,
|
||||
setFixedTimeMode,
|
||||
setRealTimeMode,
|
||||
setIndependentTimeConductorBounds
|
||||
} = require('../../../../appActions');
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const LOCALSTORAGE_PATH = path.resolve(
|
||||
__dirname,
|
||||
'../../../../test-data/display_layout_with_child_layouts.json'
|
||||
import {
|
||||
createDomainObjectWithDefaults,
|
||||
setFixedTimeMode,
|
||||
setIndependentTimeConductorBounds,
|
||||
setRealTimeMode,
|
||||
setStartOffset
|
||||
} from '../../../../appActions.js';
|
||||
import { expect, test } from '../../../../pluginFixtures.js';
|
||||
|
||||
const LOCALSTORAGE_PATH = fileURLToPath(
|
||||
new URL('../../../../test-data/display_layout_with_child_layouts.json', import.meta.url)
|
||||
);
|
||||
const TINY_IMAGE_BASE64 =
|
||||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII';
|
||||
@ -51,7 +50,7 @@ test.describe('Display Layout Toolbar Actions @localStorage', () => {
|
||||
await page.getByLabel('Edit').click();
|
||||
});
|
||||
test.use({
|
||||
storageState: path.resolve(__dirname, LOCALSTORAGE_PATH)
|
||||
storageState: LOCALSTORAGE_PATH
|
||||
});
|
||||
|
||||
test('can add/remove Text element to a single layout', async ({ page }) => {
|
||||
|
Reference in New Issue
Block a user