showcar-ui
Version:
Showcar-ui is the pattern library that is used to build the frontend of AutoScout24. It provides CSS classes, custom elements and components.
22 lines (19 loc) • 723 B
JavaScript
module.exports = (frame, assert) => {
describe('Buttons', () => {
let buttons;
beforeEach(() => {
labels = frame.getAll('#label .sc-label');
inputs = frame.getAll('#label .sc-label + .sc-input');
assert(labels.length() > 0, 'we have no labels on the page');
assert(inputs.length() > 0, 'we have no inputs on the page');
});
it('Labels position is correct', () => {
for (var i = 0; i < labels.length() - 1; i ++) {
labels.at(i).assert({
bottom: inputs.at(i).top.minus(4), // magic numbers
left: inputs.at(i).left
});
}
});
});
};