Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
ember-cli-page-object
Advanced tools
This ember-cli addon eases the construction of page objects on your acceptance tests
Represent the screens of your web app as a series of objects. This ember-cli addon eases the construction of these objects on your acceptance tests.
http://ember-cli-page-object.js.org/
An excerpt from the Selenium Wiki
Within your web app's UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.
The pattern was first introduced by the Selenium
You can find more information about this design pattern here:
Check the site for full documentation.
Install the npm package on your ember-cli project
npm install --save-dev ember-cli-page-object
then you can use it from your acceptance tests
import PageObject from '../page-object';
const { fillable, text, visitable } = PageObject;
const login = PageObject.create({
visit: visitable('/login'),
userName: fillable('#username'),
password: fillable('#password'),
errorMessage: text('.message')
});
test('Invalid log in', function(assert) {
login
.visit()
.userName('user@example.com')
.password('secret')
.clickOn('Log in');
andThen(function() {
assert.equal(login.errorMessage(), 'Invalid credentials!');
});
});
The addon includes the following blueprints
page-object
Creates a new page objectpage-object-component
Creates a new a component to be used in a page objectpage-object-helper
Creates a new a helper to be used in a page objectYou can create a new page object called users
using the generate
command
$ ember generate page-object users
installing
create tests/pages/users.js
import { test } from 'qunit';
import moduleForAcceptance from '../helpers/module-for-acceptance';
import page from '../pages/users';
moduleForAcceptance();
test('visiting /users', function(assert) {
page.visit();
andThen(function() {
assert.equal(currentPath(), 'users');
});
});
git clone
this repositorynpm install
bower install
ember server
npm test
(Runs ember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
ember-cli-page-object is licensed under the MIT license.
See LICENSE for the full license text.
FAQs
This ember-cli addon eases the construction of page objects on your acceptance and integration tests
The npm package ember-cli-page-object receives a total of 0 weekly downloads. As such, ember-cli-page-object popularity was classified as not popular.
We found that ember-cli-page-object demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.