fix api test

pull/5370/head
filip mertens 3 years ago
parent a02ec93149
commit b52a940385
  1. 13
      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) {
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