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

Mgmt saved object test #22564

Merged
merged 12 commits into from
Sep 5, 2018

Conversation

rashmivkulkarni
Copy link
Contributor

Test to check the import of the saved object works.

  • Added data test subject

Tests #22238 - but the json is a subset.

@rashmivkulkarni
Copy link
Contributor Author

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rashmivkulkarni
Copy link
Contributor Author

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rashmivkulkarni
Copy link
Contributor Author

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rashmivkulkarni rashmivkulkarni requested a review from LeeDr August 31, 2018 15:06
@rashmivkulkarni
Copy link
Contributor Author

@LeeDr can you please tae a look ?

@LeeDr
Copy link

LeeDr commented Aug 31, 2018

@Rasroh Are you sure you added your files? I see Files changed 0 at the top.

@@ -53,7 +53,7 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.settings.clickKibanaSavedObjects();
await PageObjects.settings.importFile(path.join(__dirname, 'exports', '_import_objects-conflicts.json'));
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.settings.setImportIndexFieldOption(2);
await PageObjects.settings.setImportIndexFieldOption('d1e4c910-a2e6-11e7-bb30-233be9be6a15', 2);
await PageObjects.settings.clickConfirmChanges();
Copy link

Choose a reason for hiding this comment

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

I don't understand why we're still using an integer index here "2"? I thought a data-test-subj was added so we could select them by name?

await find.clickByCssSelector(
`select[data-test-subj="managementChangeIndexSelection"] > option:nth-child(${child})`
`select[data-test-subj="managementChangeIndexSelection-${id}"] > option:nth-child(${child})`
);
Copy link

Choose a reason for hiding this comment

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

Related to the other comment about the integer index. Hopefully we can use the name instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

here , I have parametrized the id - when I run the test- setImportIndexFieldOption takes 2 parameters -> (id, child)` - id is the name of the indexPattern

test/functional/page_objects/settings_page.js Outdated Show resolved Hide resolved
@LeeDr
Copy link

LeeDr commented Aug 31, 2018

Here's a screenshot as I inspected elements in that selection list. The only selection I have is the one index pattern I created .kibana. So the test in this case should be able to pass the original index pattern id (in this case 4c3f3c30-ac94-11e8-a651-614b2788174a) and the name of the currently existing index pattern to change it to (in this case .kibana) as parameters (not the childOf index);

image

image

@rashmivkulkarni
Copy link
Contributor Author

incorporated all the review changes and testing it in jenkins.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@rashmivkulkarni
Copy link
Contributor Author

jenkins test this

Copy link
Contributor

@bmcconaghy bmcconaghy left a comment

Choose a reason for hiding this comment

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

Had a question about some deletions.

test/functional/page_objects/settings_page.js Show resolved Hide resolved
Copy link
Contributor

@bmcconaghy bmcconaghy left a comment

Choose a reason for hiding this comment

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

LGTM assuming tests pass.

@rashmivkulkarni
Copy link
Contributor Author

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rashmivkulkarni rashmivkulkarni merged commit 2938d94 into elastic:master Sep 5, 2018
rashmivkulkarni added a commit to rashmivkulkarni/kibana that referenced this pull request Sep 5, 2018
rashmivkulkarni added a commit that referenced this pull request Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants