Files
editor/test/functional/screenshots/index.js
Harel M 18f45e932b 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
2023-12-17 01:14:23 -05:00

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")
})
})