mirror of
https://github.com/maputnik/editor.git
synced 2026-02-06 12:40:00 +00:00
* Initial commit * Fix spec * Move driver * Fix config location * Fix helper location * More usage of driver * Add click * Fix click * Migrate more tests * Add setValue to driver * Move more code to driver * add isExisting to driver * Change modal tests to use driver * Fix tests * Fix test * Fix invalid alert wait * Fix missing wd * Fix tests * Fix missing fs * Fix test * Fix path * Move screenshort to driver * Migrate keyboard * Migrate skiplinks to driver * Fix tests * Try fix skip-links * add config * Add helper * Fix driver? * remove helper * remove wd-helper * Remove redundant file * Remove webdriver extsions
63 lines
1.7 KiB
JavaScript
63 lines
1.7 KiB
JavaScript
var driver = require("../driver");
|
|
|
|
|
|
// These will get used in the marketing material. They are also useful to do a quick manual check of the styling across browsers
|
|
// NOTE: These duplicate some of the tests, however this is indended becuase it's likely these will change for aesthetic reasons over time
|
|
describe('screenshots', function() {
|
|
|
|
beforeEach(async function() {
|
|
await driver.setWindowSize(1280, 800)
|
|
})
|
|
|
|
it("front_page", async function() {
|
|
await driver.setStyle(["geojson:example"]);
|
|
|
|
await driver.takeScreenShot("/front_page.png")
|
|
})
|
|
|
|
it("open", async function() {
|
|
await driver.setStyle(["geojson:example"]);
|
|
await driver.click(driver.getDataAttribute("nav:open"));
|
|
await driver.zeroTimeout();
|
|
|
|
await driver.takeScreenShot("/open.png")
|
|
})
|
|
|
|
it("export", async function() {
|
|
await driver.setStyle(["geojson:example"]);
|
|
|
|
await driver.click(driver.getDataAttribute("nav:export"));
|
|
await driver.zeroTimeout();
|
|
|
|
await driver.takeScreenShot("/export.png")
|
|
})
|
|
|
|
it("sources", async function() {
|
|
await driver.setStyle(["geojson:example"]);
|
|
|
|
await driver.click(driver.getDataAttribute("nav:sources"));
|
|
await driver.zeroTimeout();
|
|
|
|
await driver.takeScreenShot("/sources.png")
|
|
})
|
|
|
|
it("style settings", async function() {
|
|
await driver.setStyle(["geojson:example"]);
|
|
|
|
await driver.click(driver.getDataAttribute("nav:settings"));
|
|
await driver.zeroTimeout();
|
|
|
|
await driver.takeScreenShot("/settings.png")
|
|
})
|
|
|
|
it("inspect", async function() {
|
|
await driver.setStyle(["geojson:example"]);
|
|
|
|
await driver.selectFromDropdown(driver.getDataAttribute("nav:inspect", "select"), 'inspect');
|
|
await driver.zeroTimeout();
|
|
|
|
await driver.takeScreenShot("/inspect.png")
|
|
})
|
|
})
|
|
|