5b8d59c00b
ToDo left: refactor `datetimes` property of `create-options-datetime` component to not cause whole list to be updated. This is not only a performance issue but also UX: e.g. validation state is lost when another item is added.
27 lines
599 B
JavaScript
27 lines
599 B
JavaScript
import PageObject from 'croodle/tests/page-object';
|
|
|
|
let {
|
|
clickable,
|
|
collection,
|
|
fillable,
|
|
text
|
|
} = PageObject;
|
|
|
|
export default PageObject.create({
|
|
days: collection({
|
|
itemScope: '.days',
|
|
item: {
|
|
times: collection({
|
|
itemScope: '.form-group',
|
|
item: {
|
|
add: clickable('button.add'),
|
|
delete: clickable('button.delete'),
|
|
time: fillable('input')
|
|
}
|
|
}),
|
|
label: text('.form-group:eq(0) label')
|
|
},
|
|
labels: text('.days .form-group label', { multiple: true })
|
|
}),
|
|
next: clickable('button[type="submit"]')
|
|
});
|