decide.nolog.cz/tests/pages/poll/participation.js
sappor0 c23ba1f6fb Using bootstrap 4 and related UI refresh (#205)
Changes at a glance:

- Switch from BS3 to BS4
- Polishing of some UI elements (low-hanging fruit for UX)
- Mobile-friendly layout.
2019-06-07 11:22:13 +02:00

30 lines
909 B
JavaScript

import PageObject from 'ember-cli-page-object';
import { definition as Poll } from 'croodle/tests/pages/poll';
import { defaultsForApplication } from 'croodle/tests/pages/defaults';
import { hasFocus } from 'croodle/tests/pages/helpers';
let {
collection,
fillable,
text,
visitable
} = PageObject;
const { assign } = Object;
export default PageObject.create(assign({}, defaultsForApplication, Poll, {
description: text('.description'),
name: fillable('.name input'),
nameHasFocus: hasFocus('.name input'),
options: collection({
answers: text('.selections .form-group:eq(0) .radio', { multiple: true }),
itemScope: '.selections .form-group',
item: {
label: text('label')
},
labels: text('.selections .form-group > label', { multiple: true })
}),
title: text('h2.title'),
// use as .visit({ encryptionKey: ??? })
visit: visitable('/poll/participation')
}));