Skip to content

Commit

Permalink
[Security Solution][Endpoint][Admin] Fixes policy sticky footer save …
Browse files Browse the repository at this point in the history
…test (elastic#92919)

* commented code to close out toast

# Conflicts:
#	x-pack/test/security_solution_endpoint/apps/endpoint/policy_details.ts
  • Loading branch information
parkiino committed Mar 1, 2021
1 parent 74a834b commit 2567b02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
// Clear the value
await advancedPolicyField.click();
await advancedPolicyField.clearValueWithKeyboard();

// Make sure the toast button closes so the save button on the sticky footer is visible
await (await testSubjects.find('toastCloseButton')).click();
await testSubjects.waitForHidden('toastCloseButton');
await pageObjects.policy.confirmAndSave();

await testSubjects.existOrFail('policyDetailsSuccessMessage');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../ftr_provider_context';
export function EndpointPolicyPageProvider({ getService, getPageObjects }: FtrProviderContext) {
const pageObjects = getPageObjects(['common', 'header']);
const testSubjects = getService('testSubjects');
const browser = getService('browser');

return {
/**
Expand Down Expand Up @@ -70,7 +69,6 @@ export function EndpointPolicyPageProvider({ getService, getPageObjects }: FtrPr
*/
async confirmAndSave() {
await this.ensureIsOnDetailsPage();
await browser.scrollTop();
await (await this.findSaveButton()).click();
await testSubjects.existOrFail('policyDetailsConfirmModal');
await pageObjects.common.clickConfirmOnModal();
Expand Down

0 comments on commit 2567b02

Please sign in to comment.