Skip to content

Commit

Permalink
fixes funcitonal text bug where toast doesn't close
Browse files Browse the repository at this point in the history
  • Loading branch information
parkiino committed Feb 25, 2021
1 parent cdf681f commit 885bf35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 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 @@ -460,10 +460,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await advancedPolicyField.click();
await advancedPolicyField.clearValueWithKeyboard();

// Since the Save button is on a sticky footer, it first closes out the success toast before saving again
await testSubjects.existOrFail('policyDetailsSuccessMessage');
// await (await testSubjects.find('ToastExit')).click();
// await testSubjects.missingOrFail('policyDetailsSuccessMessage');
// Make sure the toast button closes so the save button on the sticky footer is visible
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 @@ -70,10 +70,6 @@ export function EndpointPolicyPageProvider({ getService, getPageObjects }: FtrPr
*/
async confirmAndSave() {
await this.ensureIsOnDetailsPage();
// await browser.scrollTop();
await testSubjects.existOrFail('policyDetailsSuccessMessage');
// await this.findToastExit + click
// await testSubjects.missingOrFail('policyDetailsSuccessMessage');
await (await this.findSaveButton()).click();
await testSubjects.existOrFail('policyDetailsConfirmModal');
await pageObjects.common.clickConfirmOnModal();
Expand Down

0 comments on commit 885bf35

Please sign in to comment.