-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mobile] Add Global Search to Mobile #7477
Merged
Merged
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
1729658
Add status area back to mobile
rukmini-bose cde5f15
Make search results responsive to width
rukmini-bose 195f7d9
Make clear search button always visible, regardless of hover
rukmini-bose 5215622
Make clear search button visible, and fix weird margin in top left co…
rukmini-bose c3edfc0
Fix input width, add logic to make close button work properly, fix ma…
rukmini-bose 1988567
update mobile testing
unlikelyzero 7d00f77
Fix dropdown sizes, remove shadows and corners to make it look less l…
rukmini-bose 2636785
Add animation and persist search bar in mobile
rukmini-bose f1d88d6
Fix linting issues
rukmini-bose 7b765f6
Fix padding in Desktop
rukmini-bose 9511b8c
fix padding in status area
rukmini-bose c849059
Merge branch 'master' into status-area-redesign
unlikelyzero 41c3eb0
fix bad merge
unlikelyzero 5cc0dea
lint fixes
unlikelyzero c8fbae6
Merge branch 'master' of https://github.com/nasa/openmct into status-…
unlikelyzero bc0ce80
fix bad merge... again
unlikelyzero b5f86d6
again
unlikelyzero 65bc381
fixes to mobile
unlikelyzero 6433872
update tests
unlikelyzero 8fcd4dd
lint fix
unlikelyzero 679e9b4
test fixes
unlikelyzero f762f38
Merge branch 'master' of https://github.com/nasa/openmct into status-…
unlikelyzero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// playwright.config.js | ||
// @ts-check | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
import { devices } from '@playwright/test'; | ||
const MAX_FAILURES = 5; | ||
const NUM_WORKERS = 2; | ||
|
||
import { fileURLToPath } from 'url'; | ||
|
||
/** @type {import('@playwright/test').PlaywrightTestConfig} */ | ||
const config = { | ||
retries: 1, //Retries 2 times for a total of 3 runs. When running sharded and with max-failures=5, this should ensure that flake is managed without failing the full suite | ||
testDir: 'tests', | ||
testIgnore: '**/*.perf.spec.js', //Ignore performance tests and define in playwright-perfromance.config.js | ||
timeout: 30 * 1000, | ||
webServer: { | ||
command: 'npm run start:coverage', | ||
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. | ||
}, | ||
maxFailures: MAX_FAILURES, //Limits failures to 5 to reduce CI Waste | ||
workers: NUM_WORKERS, //Limit to 2 for CircleCI Agent | ||
use: { | ||
baseURL: 'http://localhost:8080/', | ||
headless: true, | ||
ignoreHTTPSErrors: true, | ||
screenshot: 'only-on-failure', | ||
trace: 'on-first-retry', | ||
video: 'off' | ||
}, | ||
projects: [ | ||
{ | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/***************************************************************************** | ||
* Open MCT, Copyright (c) 2014-2024, United States Government | ||
* as represented by the Administrator of the National Aeronautics and Space | ||
* Administration. All rights reserved. | ||
* | ||
* Open MCT is licensed under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* Open MCT includes source code licensed under additional open source | ||
* licenses. See the Open Source Licenses file (LICENSES.md) included with | ||
* this source code distribution or the Licensing information page available | ||
* at runtime from the About dialog for additional information. | ||
*****************************************************************************/ | ||
|
||
/* | ||
This test suite is dedicated to tests which can quickly verify that any openmct installation is | ||
operable and that any type of testing can proceed. | ||
|
||
Ideally, smoke tests should make zero assumptions about how and where they are run. This makes them | ||
more resilient to change and therefor a better indicator of failure. Smoke tests will also run quickly | ||
as they cover a very "thin surface" of functionality. | ||
|
||
When deciding between authoring new smoke tests or functional tests, ask yourself "would I feel | ||
comfortable running this test during a live mission?" Avoid creating or deleting Domain Objects. | ||
Make no assumptions about the order that elements appear in the DOM. | ||
*/ | ||
|
||
import { expect, test } from '../../pluginFixtures.js'; | ||
|
||
test('Verify that My Items Tree appears @mobile', async ({ page, openmctConfig }) => { | ||
const { myItemsFolderName } = openmctConfig; | ||
//Go to baseURL | ||
await page.goto('./'); | ||
|
||
//My Items to be visible | ||
await expect(page.getByRole('treeitem', { name: `${myItemsFolderName}` })).toBeVisible(); | ||
}); | ||
|
||
test('Verify that user can search @mobile', async ({ page }) => { | ||
//For now, this test is going to be hardcoded against './test-data/display_layout_with_child_layouts.json' | ||
await page.goto('./'); | ||
|
||
await page.getByRole('searchbox', { name: 'Search Input' }).click(); | ||
await page.getByRole('searchbox', { name: 'Search Input' }).fill('Parent Display Layout'); | ||
//Search Results appear in search modal | ||
await expect(page.getByLabel('Object Results').getByText('Parent Display Layout')).toBeVisible(); | ||
//Clicking on the search result takes you to the object | ||
await page.getByLabel('Object Results').getByText('Parent Display Layout').click(); | ||
await page.getByTitle('Collapse Browse Pane').click(); | ||
await expect(page.getByRole('main').getByText('Parent Display Layout')).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is broken