UNPKG

4.08 kBMarkdownView Raw
1# Ember Page Objects
2
3[![Build Status](https://travis-ci.org/san650/ember-cli-page-object.svg?branch=master)](https://travis-ci.org/san650/ember-cli-page-object)
4[![Ember Observer Score](http://emberobserver.com/badges/ember-cli-page-object.svg)](http://emberobserver.com/addons/ember-cli-page-object)
5![Latest version](https://img.shields.io/npm/v/ember-cli-page-object.svg)
6
7Represent the screens of your web app as a series of objects. This ember-cli addon eases the construction of these objects for your acceptance and integration tests.
8
9http://ember-cli-page-object.js.org/
10
11## What is a Page Object?
12
13An excerpt from the Selenium Wiki
14
15> Within your web app's UI there are areas that your tests interact with. A Page
16> Object simply models these as objects within the test code. This reduces the
17> amount of duplicated code and means that if the UI changes, the fix need only
18> be applied in one place.
19
20The pattern was first introduced by the Selenium
21
22You can find more information about this design pattern here:
23
24* [Page Objects - Selenium wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects)
25* [PageObject - Martin Fowler](http://martinfowler.com/bliki/PageObject.html)
26
27## Community
28
29Let's work together to improve this addon!
30
31You can find us on the [official Ember Discord server](https://discord.gg/zT3asNS), or [open an issue on Github](https://github.com/san650/ember-cli-page-object/issues) to request features, report bugs or just to ask any question.
32
33Installation
34------------------------------------------------------------------------------
35
36```sh
37$ ember install ember-cli-page-object
38```
39
40Or you can install the NPM package directly.
41
42```sh
43$ npm install --save-dev ember-cli-page-object
44```
45
46## Documentation
47
48Check the [site](http://ember-cli-page-object.js.org/) for full documentation.
49
50## Blueprints
51
52The addon includes the following blueprints
53
54* `page-object` Creates a new page object
55* `page-object-component` Creates a new component to be used in a page object
56* `page-object-helper` Creates a new helper to be used in a page object
57
58You can create a new page object called `users` using the `generate` command
59
60```sh
61$ ember generate page-object users
62
63installing
64 create tests/pages/users.js
65```
66
67## Development
68
69### Installation
70
71```sh
72$ git clone https://github.com/san650/ember-cli-page-object.git
73$ cd $_
74$ yarn install # or npm install
75```
76
77### Linting
78
79* `npm run lint:hbs`
80* `npm run lint:js`
81* `npm run lint:js -- --fix`
82
83### Running Tests
84
85* `ember test` – Runs the test suite on the current Ember version
86* `ember test --server` – Runs the test suite in "watch mode"
87* `ember try:each` – Runs the test suite against multiple Ember versions
88
89### Project's health
90
91[![Build Status](https://travis-ci.org/san650/ember-cli-page-object.svg?branch=master)](https://travis-ci.org/san650/ember-cli-page-object)
92[![Ember Observer Score](http://emberobserver.com/badges/ember-cli-page-object.svg)](http://emberobserver.com/addons/ember-cli-page-object)
93[![Dependency Status](https://david-dm.org/san650/ember-cli-page-object.svg)](https://david-dm.org/san650/ember-cli-page-object)
94[![devDependency Status](https://david-dm.org/san650/ember-cli-page-object/dev-status.svg)](https://david-dm.org/san650/ember-cli-page-object#info=devDependencies)
95[![Codacy Badge](https://api.codacy.com/project/badge/grade/35545e8e8ade48dfa999a3f5e1aa4b3b)](https://www.codacy.com/app/san650/ember-cli-page-object)
96[![Code Climate](https://codeclimate.com/github/san650/ember-cli-page-object/badges/gpa.svg)](https://codeclimate.com/github/san650/ember-cli-page-object)
97[![Coverage Status](https://coveralls.io/repos/github/san650/ember-cli-page-object/badge.svg?branch=master)](https://coveralls.io/github/san650/ember-cli-page-object?branch=master)
98
99### Maintainers
100
101- Santiago Ferreira (@san650)
102- Juan Manuel Azambuja (@juanazam)
103- Jerad Gallinger (@jeradg)
104- Anna Andresian (@magistrula)
105- Ruslan Grabovoy (@ro0gr)
106
107## License
108
109ember-cli-page-object is licensed under the MIT license.
110
111See [LICENSE](./LICENSE) for the full license text.