parent
ef5e310d48
commit
6e8d95a13b
@ -0,0 +1,18 @@ |
||||
import { NightwatchBrowser } from 'nightwatch' |
||||
import EventEmitter from 'events' |
||||
|
||||
class switchEnvironment extends EventEmitter { |
||||
command (this: NightwatchBrowser, provider: string): NightwatchBrowser { |
||||
this.api.waitForElementVisible('[data-id="settingsSelectEnvOptions"]') |
||||
.click('[data-id="settingsSelectEnvOptions"] button') |
||||
.waitForElementVisible(`[data-id="dropdown-item-${provider}"]`) |
||||
.click(`[data-id="dropdown-item-${provider}"]`) |
||||
.perform((done) => { |
||||
done() |
||||
this.emit('complete') |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = switchEnvironment |
Loading…
Reference in new issue