tractor-plugin-screen-size

0.3.1 • Public • Published

tractor-plugin-screen-size

Plugin for tractor for running tests at different screen sizes.

Greenkeeper badge npm version bitHound Overall Score Code Climate Test Coverage

How to use:

As config:

You can add a screenSizes property to your "tractor.conf.js" file. Each size given will create a tag, which will resize the browser before your test runs.

module.exports = {
    screenSizes: {
        sm: { width: 360, height: 480 }, // Creates a tag @screen-size:sm, at 360x840
        md: 768 // Creates a tag @screen-size:md, at 768x1000
    }
};

Within a test:

You can also use the ScreenSize.setSize method in a Page Object. It takes a string which should be the name of the size from your config, e.g. 'sm' or 'md' with the config from above.

Dependencies (0)

    Dev Dependencies (22)

    Package Sidebar

    Install

    npm i tractor-plugin-screen-size

    Weekly Downloads

    1

    Version

    0.3.1

    License

    MIT

    Last publish

    Collaborators

    • phenomnomnominal