Skip to content
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

[MDS]Add FT for Import saved objects #1349

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yujin-emma
Copy link
Collaborator

@yujin-emma yujin-emma commented Jun 3, 2024

Description

Add test to import MDS exported saved objects to MDS DS

Issues Resolved

06_06_01_mds_import_test.spec.js.mp4

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Member

@huyaboo huyaboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one minor non-blocking comment

cy.contains('new').should('be.visible');
} else {
if (override !== 'overwriteEnabled') {
for (let i = 0; i < 29; i++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I assume 29 is the number of conflicting saved objects. Could this be extracted into a variable like numConflictingSavedObjects?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the length of the test file length, good suggestion if we consider always using this as the test file

* SPDX-License-Identifier: Apache-2.0
*/

Cypress.Commands.add('selectDataSourceForImport', (dataSourceTitle) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we reuse existing util to select data source from data source selector?

'selectFromDataSourceSelector',

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I tried this one, but I found the selector on import page does not have the input, while the dev tools has this functionality, if reusing, it can break

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, let's use your util for import then. Great finding, let me file an issue on OSD to make "isClearable" prop consistent across all places that consumes this selector in OSD

@zhongnansu
Copy link
Member

@yujin-emma CI failed to run, seems we need to update the package-lock.json file to include in this PR, since you added a new dependency. https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/9408260167/job/25915840497?pr=1349

@zhongnansu
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants