mirror of
https://github.com/maputnik/editor.git
synced 2026-01-03 03:50:00 +00:00
Use driver pattern for e2e tests (#829)
I've moved all the logic relevant to WBIO into a single file in order to be able to replace it. I have tried to upgrade WDIO in order to use the latest version and it got stuck on my computer. Furthermore, I was not able to run it locally which made this whole cycle very long. After this will be merged I will replace WDIO with cypress. This doesn't change anything, only moves some code in the tests to a single file, removes unneeded files and uses the driver pattern, which will later allow switching the underline WDIO with Cypress. cc: @nyurik
This commit is contained in:
@@ -1,16 +1,10 @@
|
||||
var config = require("../../config/specs");
|
||||
var helper = require("../helper");
|
||||
|
||||
var driver = require("../driver");
|
||||
|
||||
describe("map", function() {
|
||||
describe.skip("zoom level", function() {
|
||||
it("via url", async function() {
|
||||
var zoomLevel = "12.37"
|
||||
await browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
||||
"geojson:example"
|
||||
])+"#"+zoomLevel+"/41.3805/2.1635");
|
||||
await browser.alertAccept();
|
||||
|
||||
var zoomLevel = "12.37";
|
||||
await driver.setStyle(["geojson:example"], zoomLevel);
|
||||
await browser.waitUntil(async function () {
|
||||
return (
|
||||
await browser.isVisible(".maplibregl-ctrl-zoom")
|
||||
@@ -20,12 +14,9 @@ describe("map", function() {
|
||||
})
|
||||
it("via map controls", async function() {
|
||||
var zoomLevel = 12.37;
|
||||
await browser.url(config.baseUrl+"?debug&style="+helper.getStyleUrl([
|
||||
"geojson:example"
|
||||
])+"#"+zoomLevel+"/41.3805/2.1635");
|
||||
await browser.alertAccept();
|
||||
await driver.setStyle(["geojson:example"], zoomLevel);
|
||||
|
||||
await browser.click(".maplibregl-ctrl-zoom-in")
|
||||
await driver.click(".maplibregl-ctrl-zoom-in");
|
||||
await browser.waitUntil(async function () {
|
||||
var text = await browser.getText(".maplibregl-ctrl-zoom")
|
||||
return text === "Zoom level: "+(zoomLevel+1);
|
||||
|
||||
Reference in New Issue
Block a user