Skip to content

Instantly share code, notes, and snippets.

@marcelmokos
Created January 4, 2017 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelmokos/053cd52d02ccc6484f43a66f1039b9f5 to your computer and use it in GitHub Desktop.
Save marcelmokos/053cd52d02ccc6484f43a66f1039b9f5 to your computer and use it in GitHub Desktop.
Page object pattern example
import Homepage from "./pages/Homepage";
const homepage = new Homepage();
describe("homepage", () => {
describe("when on homepage", () => {
beforeAll(() => {
homepage.get();
});
it("then page should be displayed", () => {
expect(homepage.isDisplayed()).toBe(true);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment