Skip to content

Instantly share code, notes, and snippets.

@artyomtrityak
Created August 3, 2018 15:01
Show Gist options
  • Save artyomtrityak/cc4d329450e447447847726d1ddfa854 to your computer and use it in GitHub Desktop.
Save artyomtrityak/cc4d329450e447447847726d1ddfa854 to your computer and use it in GitHub Desktop.
import { until } from "selenium-webdriver";
import {
queryElement,
projectSelect,
waitForElementRemoval,
clickWhenAble,
sendKeysWhenAble,
page
} from "../../utils/helpers";
export default function ApplicationCreateFromScratch() {
it("should open applications list", async () => {
await page.applications("", "Applications");
});
it("should open application start create modal", async () => {
await clickWhenAble(".at-add-item-btn");
await queryElement(".ec-react-wizard__content");
});
it("should open application new create modal", async () => {
await clickWhenAble(".at-create-new-app");
await waitForElementRemoval(".ec-react-wizard__loader-content");
});
it("should fill applicationName and projectName", async () => {
await sendKeysWhenAble(".at-app-name-input", "selenium-test-app");
await projectSelect("selenium-test-project", "#ec-modals-container");
});
it("should redirect to application architecture", async () => {
await clickWhenAble(".at-ok-btn:not(.disabled)");
await global.driver.wait(until.titleIs("Application – ElectricFlow"));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment