|
|
@ -2,18 +2,11 @@ import { NightwatchBrowser } from 'nightwatch' |
|
|
|
|
|
|
|
|
|
|
|
require('dotenv').config() |
|
|
|
require('dotenv').config() |
|
|
|
|
|
|
|
|
|
|
|
export default function (browser: NightwatchBrowser, callback: VoidFunction, url?: string, preloadPlugins = true, closeWorkspaceAlert = true): void { |
|
|
|
export default function (browser: NightwatchBrowser, callback: VoidFunction, url?: string, preloadPlugins = true): void { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.url(url || 'http://127.0.0.1:8080') |
|
|
|
.url(url || 'http://127.0.0.1:8080') |
|
|
|
.pause(5000) |
|
|
|
.pause(5000) |
|
|
|
.switchBrowserTab(0) |
|
|
|
.switchBrowserTab(0) |
|
|
|
.perform((done) => { |
|
|
|
|
|
|
|
if (closeWorkspaceAlert) { |
|
|
|
|
|
|
|
browser.waitForElementVisible('*[data-id="modalDialogModalBody"]', 60000) |
|
|
|
|
|
|
|
.modalFooterOKClick() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
done() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.fullscreenWindow(() => { |
|
|
|
.fullscreenWindow(() => { |
|
|
|
if (preloadPlugins) { |
|
|
|
if (preloadPlugins) { |
|
|
|
initModules(browser, () => { |
|
|
|
initModules(browser, () => { |
|
|
|