2016-08-14 22:24:04 +02:00
|
|
|
import PageObject from 'ember-cli-page-object';
|
2016-08-14 22:57:10 +02:00
|
|
|
import { defaultsForCreate } from 'croodle/tests/pages/defaults';
|
2016-08-26 00:36:41 +02:00
|
|
|
import { hasFocus } from 'croodle/tests/pages/helpers';
|
2016-08-14 22:57:10 +02:00
|
|
|
|
2023-10-15 20:37:03 +02:00
|
|
|
const { assign } = Object;
|
2016-04-08 21:48:22 +02:00
|
|
|
|
2023-10-15 20:37:03 +02:00
|
|
|
let { clickable, collection, fillable, hasClass, text } = PageObject;
|
2016-04-08 21:48:22 +02:00
|
|
|
|
2023-10-15 20:37:03 +02:00
|
|
|
export default PageObject.create(
|
|
|
|
assign({}, defaultsForCreate, {
|
2023-10-16 00:07:22 +02:00
|
|
|
times: collection('.form-group', {
|
|
|
|
add: clickable('button.add'),
|
|
|
|
delete: clickable('button.delete'),
|
|
|
|
label: text('label'),
|
|
|
|
labelIsHidden: hasClass('label', 'sr-only'),
|
|
|
|
time: fillable('input'),
|
2023-10-15 20:37:03 +02:00
|
|
|
}),
|
|
|
|
firstTime: {
|
|
|
|
scope: '.form-group:first',
|
2016-08-26 00:36:41 +02:00
|
|
|
|
2023-10-15 20:37:03 +02:00
|
|
|
inputHasFocus: hasFocus('input'),
|
|
|
|
},
|
2023-10-17 10:44:45 +02:00
|
|
|
}),
|
2023-10-15 20:37:03 +02:00
|
|
|
);
|