# tractor-plugin-screen-size

> Plugin for [tractor](http://github.com/TradeMe/tractor) for running tests at different screen sizes.

Latest version **0.3.1** (published 2018-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install tractor-plugin-screen-size
pnpm add tractor-plugin-screen-size
yarn add tractor-plugin-screen-size
bun add tractor-plugin-screen-size
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2018-01-26 |
| First published | 2017-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Craig Spence |
| Maintainers | phenomnomnominal |

## Links

- npm: https://www.npmjs.com/package/tractor-plugin-screen-size
- Repository: https://github.com/phenomnomnominal/tractor-plugin-screen-size
- Homepage: https://github.com/phenomnomnominal/tractor-plugin-screen-size#readme
- Issues: https://github.com/phenomnomnominal/tractor-plugin-screen-size/issues
- npm.io page: https://npm.io/package/tractor-plugin-screen-size

## Recent versions

- 0.3.1 (latest) — 2018-01-26
- 0.3.0 — 2018-01-26
- 0.2.1 — 2017-11-01
- 0.2.0 — 2017-11-01
- 0.1.3 — 2017-04-23
- 0.1.1 — 2017-02-07
- 0.1.0 — 2017-02-06
- 0.1.0-beta.3 — 2017-02-06
- 0.1.0-beta.2 — 2017-02-06
- 0.1.0-beta.1 — 2017-02-06
- 0.1.0-beta.0 — 2017-02-06

## README

# tractor-plugin-screen-size

Plugin for [tractor](http://github.com/TradeMe/tractor) for running tests at different screen sizes.

[![Greenkeeper badge](https://badges.greenkeeper.io/phenomnomnominal/tractor-plugin-screen-size.svg)](https://greenkeeper.io/)
[![npm version](https://img.shields.io/npm/v/tractor-plugin-screen-size.svg)](https://www.npmjs.com/package/tractor-plugin-screen-size)
[![bitHound Overall Score](https://www.bithound.io/github/phenomnomnominal/tractor-plugin-screen-size/badges/score.svg)](https://www.bithound.io/github/phenomnomnominal/tractor-plugin-screen-size)
[![Code Climate](https://codeclimate.com/github/phenomnomnominal/tractor-plugin-screen-size/badges/gpa.svg)](https://codeclimate.com/github/phenomnomnominal/tractor-plugin-screen-size)
[![Test Coverage](https://codeclimate.com/github/phenomnomnominal/tractor-plugin-screen-size/coverage.svg)](https://codeclimate.com/github/phenomnomnominal/tractor-plugin-screen-size/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.

```javascript
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.

---
_Source: https://npm.io/package/tractor-plugin-screen-size · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
