Skip to content

Commit

Permalink
commented code to close out toast
Browse files Browse the repository at this point in the history
  • Loading branch information
parkiino committed Feb 25, 2021
1 parent f0838e6 commit cdf681f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
// Clear the value
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');
await pageObjects.policy.confirmAndSave();

await testSubjects.existOrFail('policyDetailsSuccessMessage');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ export function EndpointPolicyPageProvider({ getService, getPageObjects }: FtrPr
*/
async confirmAndSave() {
await this.ensureIsOnDetailsPage();
await browser.scrollTop();
// 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 cdf681f

Please sign in to comment.