mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:35:25 +01:00
Updated to new webdriverio config api, and fixed failing tests.
This commit is contained in:
parent
ba9d21c045
commit
2cc7c63bb1
2 changed files with 12 additions and 5 deletions
|
@ -97,7 +97,7 @@ exports.config = {
|
|||
//
|
||||
screenshotPath: SCREENSHOT_PATH,
|
||||
// Note: This is here because @orangemug currently runs Maputnik inside a docker container.
|
||||
host: process.env.DOCKER_HOST || "0.0.0.0",
|
||||
hostname: process.env.DOCKER_HOST || "0.0.0.0",
|
||||
// Set a base URL in order to shorten url command calls. If your `url` parameter starts
|
||||
// with `/`, the base url gets prepended, not including the path portion of your baseUrl.
|
||||
// If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
|
||||
|
@ -147,12 +147,16 @@ exports.config = {
|
|||
onPrepare: function (config, capabilities) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var compiler = webpack(webpackConfig);
|
||||
const serverHost = isDocker() ? "0.0.0.0" : "localhost";
|
||||
|
||||
server = new WebpackDevServer(compiler, {
|
||||
host: serverHost,
|
||||
stats: {
|
||||
colors: true
|
||||
}
|
||||
});
|
||||
server.listen(testConfig.port, (isDocker() ? "0.0.0.0" : "localhost"), function(err) {
|
||||
|
||||
server.listen(testConfig.port, serverHost, function(err) {
|
||||
if(err) {
|
||||
reject(err);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,10 @@ var helper = require("../helper");
|
|||
|
||||
|
||||
function closeModal(wdKey) {
|
||||
const selector = wd.$(wdKey);
|
||||
|
||||
browser.waitUntil(function() {
|
||||
const elem = $(wdKey);
|
||||
const elem = $(selector);
|
||||
return elem.isDisplayedInViewport();
|
||||
});
|
||||
|
||||
|
@ -15,8 +17,9 @@ function closeModal(wdKey) {
|
|||
closeBtnSelector.click();
|
||||
|
||||
browser.waitUntil(function() {
|
||||
const elem = $(wdKey);
|
||||
return !elem.isDisplayed();
|
||||
return browser.execute((selector) => {
|
||||
return !document.querySelector(selector);
|
||||
}, selector);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue