Not has-class
Methods
Table of Contents
notHasClass
Parameters
cssClass
string CSS class to be validatedselector
string CSS selector of the element to checkuserOptions
(optional, default{}
)-
options
Object Additional options
Examples
// <em class="lorem"></em><span class="success">Message!</span>
import { create, notHasClass } from 'ember-cli-page-object';
const page = create({
messageIsSuccess: notHasClass('error', 'span')
});
assert.ok(page.messageIsSuccess);
// <div>
// <span class="lorem"></span>
// </div>
// <div class="scope">
// <span class="ipsum"></span>
// </div>
import { create, notHasClass } from 'ember-cli-page-object';
const page = create({
spanNotHasClass: notHasClass('lorem', 'span', { scope: '.scope' })
});
assert.ok(page.spanNotHasClass);
// <div>
// <span class="lorem"></span>
// </div>
// <div class="scope">
// <span class="ipsum"></span>
// </div>
import { create, notHasClass } from 'ember-cli-page-object';
const page = create({
scope: '.scope',
spanNotHasClass: notHasClass('lorem', 'span')
});
assert.ok(page.spanNotHasClass);
- Throws any Will throw an error if no element matches selector
- Throws any Will throw an error if multiple elements are matched by selector
Returns Descriptor