mirror of
https://github.com/nasa/openmct.git
synced 2024-12-29 01:18:52 +00:00
6393a77c19
* Add status area back to mobile * Make search results responsive to width * Make clear search button always visible, regardless of hover * Make clear search button visible, and fix weird margin in top left corner * Fix input width, add logic to make close button work properly, fix margin on results so there is room for close button, fix various landscape mode issues * update mobile testing * Fix dropdown sizes, remove shadows and corners to make it look less like a popup and more full screen * Add animation and persist search bar in mobile * Fix linting issues * Fix padding in Desktop * fix padding in status area * fix bad merge * lint fixes * fix bad merge... again * again * fixes to mobile * update tests * lint fix * test fixes --------- Co-authored-by: John Hill <john.c.hill@nasa.gov>
72 lines
2.1 KiB
JavaScript
72 lines
2.1 KiB
JavaScript
// playwright.config.js
|
|
// @ts-check
|
|
|
|
import { devices } from '@playwright/test';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
const config = {
|
|
retries: 0, //Retries are not needed with watch mode
|
|
testDir: 'tests',
|
|
timeout: 60 * 1000,
|
|
webServer: {
|
|
command: 'npm run start', //Start in dev mode for hot reloading
|
|
url: 'http://localhost:8080/#',
|
|
timeout: 200 * 1000,
|
|
reuseExistingServer: true //This was originally disabled to prevent differences in local debugging vs. CI. However, it significantly speeds up local debugging.
|
|
},
|
|
workers: '75%', //Limit to 75% of the CPU to support running with dev server
|
|
use: {
|
|
baseURL: 'http://localhost:8080/',
|
|
headless: true,
|
|
ignoreHTTPSErrors: true,
|
|
screenshot: 'only-on-failure',
|
|
trace: 'on-first-retry',
|
|
video: 'off'
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chrome',
|
|
testMatch: '**/*.spec.js', // run all tests
|
|
use: {
|
|
browserName: 'chromium'
|
|
}
|
|
},
|
|
{
|
|
name: 'ipad',
|
|
grep: /@mobile/,
|
|
use: {
|
|
storageState: fileURLToPath(
|
|
new URL('./test-data/display_layout_with_child_layouts.json', import.meta.url)
|
|
),
|
|
browserName: 'webkit',
|
|
...devices['iPad (gen 7) landscape'] // Complete List https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
|
|
}
|
|
},
|
|
{
|
|
name: 'iphone',
|
|
grep: /@mobile/,
|
|
use: {
|
|
storageState: fileURLToPath(
|
|
new URL('./test-data/display_layout_with_child_layouts.json', import.meta.url)
|
|
),
|
|
browserName: 'webkit',
|
|
...devices['iPhone 14 Pro'] // Complete List https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json
|
|
}
|
|
}
|
|
],
|
|
reporter: [
|
|
['list'],
|
|
[
|
|
'html',
|
|
{
|
|
open: 'never',
|
|
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
|
|
}
|
|
],
|
|
['junit', { outputFile: '../test-results/results.xml' }]
|
|
]
|
|
};
|
|
|
|
export default config;
|