2023-10-15 20:37:03 +02:00
|
|
|
import { attribute, collection, create, text } from 'ember-cli-page-object';
|
2017-08-26 02:14:09 +02:00
|
|
|
import { definition as Poll } from 'croodle/tests/pages/poll';
|
2017-08-11 16:39:36 +02:00
|
|
|
import { defaultsForApplication } from 'croodle/tests/pages/defaults';
|
|
|
|
|
2023-10-15 20:37:03 +02:00
|
|
|
export default create(
|
2023-10-28 19:21:45 +02:00
|
|
|
Object.assign({}, defaultsForApplication, Poll, {
|
2023-10-15 20:37:03 +02:00
|
|
|
options: collection(
|
|
|
|
'[data-test-table-of="participants"] thead tr:last-child th:not(:first-child)',
|
|
|
|
{
|
|
|
|
label: text(''),
|
2023-10-17 10:44:45 +02:00
|
|
|
},
|
2023-10-15 20:37:03 +02:00
|
|
|
),
|
|
|
|
participants: collection(
|
|
|
|
'[data-test-table-of="participants"] [data-test-participant]',
|
|
|
|
{
|
|
|
|
name: text('[data-test-value-for="name"]'),
|
|
|
|
selections: collection('[data-test-is-selection-cell]', {
|
|
|
|
answer: text(''),
|
|
|
|
option: attribute('data-test-value-for', ''),
|
|
|
|
}),
|
2023-10-17 10:44:45 +02:00
|
|
|
},
|
2023-10-15 20:37:03 +02:00
|
|
|
),
|
2023-10-17 10:44:45 +02:00
|
|
|
}),
|
2023-10-15 20:37:03 +02:00
|
|
|
);
|