parent
83087fcdf0
commit
9d0fdf23b6
@ -0,0 +1,17 @@ |
||||
import { NightwatchBrowser } from 'nightwatch' |
||||
import EventEmitter from 'events' |
||||
|
||||
class CurrentWorkspace extends EventEmitter { |
||||
command (this: NightwatchBrowser, name: string): NightwatchBrowser { |
||||
this.api |
||||
.execute(() => { |
||||
return (document.querySelector('select[data-id="workspacesSelect"]') as any).value |
||||
}, [], (result) => { |
||||
this.api.assert.equal(result.value, name) |
||||
this.emit('complete') |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = CurrentWorkspace |
Loading…
Reference in new issue