protractor-cucumber-boilerplate
* `gulp test --env dev --tags "@debug"`
Last updated 2 years ago by alexgalichenko .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install protractor-cucumber-boilerplate 
SYNC missed versions from official npm registry.

How to run

  • gulp test --env dev --tags "@debug"

Page Objects

##Page Map

const AbstractPageMap = require("protractor-boilerplate").AbstractPageMap;
const LoginPage = require("./page/LoginPage");

class PageMap extends AbstractPageMap {

    constructor() {
        super();

        this.definePage("Login", "^.+))$", LoginPage);

    }

}

###Methods

  • definePage
param mandatory description
alias M alias of the page
regexp M regexp of URL to determine page
clazz M page class

##Page

const Page = require("protractor-boilerplate").AbstractPage;
const CustomComponent = require("./CustomComponent");

class CustomPage extends Page {

    constructor() {
        super();

        this.defineComponent("Custom Component", new CustomComponent());
        this.defineElement("Custom Element", "h3");
        this.defineCollection("Custom Collection", "h3.button");
    }

}

###Methods

  • defineComponent
param mandatory description
alias M alias of the component
component M component object
  • defineElement
param mandatory description
alias M alias of the component
selector M css selector of element
  • defineCollection
param mandatory description
alias M alias of the component
selector M css selector of element

##Component

const Component = require("protractor-boilerplate").Component;

class CustomComponent extends Component {

    constructor(alias = "Dashboard", selector = ".div", isCollection = false) {
        super(alias, selector, isCollection);

        this.defineComponent("Custom Component", new CustomComponent());
        this.defineElement("Custom Element", "h3");
        this.defineCollection("Custom Collection", "h3.button");
    }

}

###Methods

  • constructor
param mandatory description
alias M alias of the component
selector M css selector of element
isCollection M isCollection flag
  • defineComponent
param mandatory description
alias M alias of the component
component M component object
  • defineElement
param mandatory description
alias M alias of the component
selector M css selector of element
  • defineCollection
param mandatory description
alias M alias of the component
selector M css selector of element

Memory

##Memory

const Memory = require("protractor-boilerplate").Memory;

defineSupportCode(({setDefaultTimeout, When}) => {

    When(/^I remember "(.+)" value as "(.+)"$/, (alias, key) => {
        const page = State.getPage();

        return page.getElement(alias).getText()
            .then((text) => {
                Memory.setValue(key, text);
            })
    });
}

###Methods

  • setValue
param mandatory description
key M key of stored item
value M value of stored item
  • parseValue returns value by provided key, otherwise returns key
param mandatory description
value M a key or simple value

Current Tags

  • 0.12.2                                ...           latest (2 years ago)

42 Versions

  • 0.12.2                                ...           2 years ago
  • 0.12.1                                ...           2 years ago
  • 0.12.0                                ...           2 years ago
  • 0.11.1                                ...           2 years ago
  • 0.11.0                                ...           2 years ago
  • 0.10.6                                ...           2 years ago
  • 0.10.5                                ...           2 years ago
  • 0.10.4                                ...           2 years ago
  • 0.10.3                                ...           2 years ago
  • 0.10.2                                ...           2 years ago
  • 0.10.1                                ...           2 years ago
  • 0.10.0                                ...           2 years ago
  • 0.9.5                                ...           2 years ago
  • 0.9.4                                ...           2 years ago
  • 0.9.3                                ...           2 years ago
  • 0.9.2                                ...           2 years ago
  • 0.9.1                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.8.1                                ...           2 years ago
  • 0.8.0                                ...           2 years ago
  • 0.7.1                                ...           2 years ago
  • 0.6.2                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.1                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.2                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.2.7                                ...           2 years ago
  • 0.2.6                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 1
Last Month 44
Dependencies (19)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |