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 (#92919)

* commented code to close out toast
  • Loading branch information
parkiino committed Mar 1, 2021
1 parent be07976 commit 1a3bbbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const policyTestResources = getService('policyTestResources');

// Failing: See https://github.com/elastic/kibana/issues/92567
describe.skip('When on the Endpoint Policy Details Page', function () {
describe('When on the Endpoint Policy Details Page', function () {
this.tags(['ciGroup7']);

describe('with an invalid policy id', () => {
Expand Down Expand Up @@ -449,6 +449,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 1a3bbbf

Please sign in to comment.