fix api test

fix_save
filip mertens 3 years ago
parent 9f4d84eb9a
commit 421f1c0f7a
  1. 17
      apps/remix-ide-e2e/src/tests/plugin_api.ts

@ -83,8 +83,21 @@ const checkForAcceptAndRemember = async function (browser: NightwatchBrowser) {
browser.frameParent(() => {
browser.pause(1000).element('xpath', '//*[@data-id="permissionHandlerRememberUnchecked"]', (visible: any) => {
if (visible.status && visible.status === -1) {
// @ts-ignore
browser.frame(0, () => { resolve(true) })
browser.pause(1000).element('xpath', '//*[@data-id="PermissionHandler-modal-footer-ok-react"]', (visiblePermission: any) => {
if (visiblePermission.status && visiblePermission.status === -1) {
// @ts-ignore
browser.frame(0, () => { resolve(true) })
} else {
browser.click('//*[@data-id="PermissionHandler-modal-footer-ok-react"]', () => {
// @ts-ignore
browser.frame(0, () => { resolve(true) })
})
}
})
} else {
browser.waitForElementVisible('//*[@data-id="permissionHandlerRememberUnchecked"]').click('//*[@data-id="permissionHandlerRememberUnchecked"]').waitForElementVisible('//*[@data-id="PermissionHandler-modal-footer-ok-react"]').click('//*[@data-id="PermissionHandler-modal-footer-ok-react"]', () => {
// @ts-ignore

Loading…
Cancel
Save