UNPKG

4.01 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://seleniumhq.github.io/docs/best.html#page_object_models)
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 Slack](https://ember-community-slackin.herokuapp.com/), join the `ec-page-object` channel 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
33## Installation
34
35```sh
36$ ember install ember-cli-page-object
37```
38
39Or you can install the NPM package directly.
40
41```sh
42$ npm install --save-dev ember-cli-page-object
43```
44
45## Documentation
46
47Check the [site](http://ember-cli-page-object.js.org/) for full documentation.
48
49## Blueprints
50
51The addon includes the following blueprints
52
53* `page-object` Creates a new page object
54* `page-object-component` Creates a new component to be used in a page object
55* `page-object-helper` Creates a new helper to be used in a page object
56
57You can create a new page object called `users` using the `generate` command
58
59```sh
60$ ember generate page-object users
61
62installing
63 create tests/pages/users.js
64```
65
66## Development
67
68### Installation
69
70```sh
71$ git clone https://github.com/san650/ember-cli-page-object.git
72$ cd $_
73$ yarn install # or npm install
74$ bower install
75```
76
77### Running Tests
78
79```sh
80$ npm test # runs tests against multiple Ember versions and runs node tests
81$ ember test --server # for development
82```
83
84### Project's health
85
86[![Build Status](https://travis-ci.org/san650/ember-cli-page-object.svg?branch=master)](https://travis-ci.org/san650/ember-cli-page-object)
87[![Ember Observer Score](http://emberobserver.com/badges/ember-cli-page-object.svg)](http://emberobserver.com/addons/ember-cli-page-object)
88[![Dependency Status](https://david-dm.org/san650/ember-cli-page-object.svg)](https://david-dm.org/san650/ember-cli-page-object)
89[![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)
90[![Codacy Badge](https://api.codacy.com/project/badge/grade/35545e8e8ade48dfa999a3f5e1aa4b3b)](https://www.codacy.com/app/san650/ember-cli-page-object)
91[![Code Climate](https://codeclimate.com/github/san650/ember-cli-page-object/badges/gpa.svg)](https://codeclimate.com/github/san650/ember-cli-page-object)
92[![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)
93
94### Maintainers
95
96- Santiago Ferreira (@san650)
97- Juan Manuel Azambuja (@juanazam)
98- Jerad Gallinger (@jeradg)
99- Anna Andresian (@magistrula)
100- Ruslan Grabovoy (@ro0gr)
101
102## License
103
104ember-cli-page-object is licensed under the MIT license.
105
106See [LICENSE](./LICENSE) for the full license text.