98ff62af80
* Update dependency prettier to v3 * upgrade eslint-plugin-prettier and run prettier on all files --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jeldrik Hanschke <admin@jhanschke.de>
18 lines
500 B
JavaScript
18 lines
500 B
JavaScript
import { create, isVisible, text } from 'ember-cli-page-object';
|
|
import { currentURL } from '@ember/test-helpers';
|
|
|
|
const urlMatches = function (regExp) {
|
|
return function () {
|
|
return regExp.test(currentURL());
|
|
};
|
|
};
|
|
|
|
export const definition = {
|
|
showsExpirationWarning: isVisible('.expiration-warning'),
|
|
url: text('.poll-link .link code'),
|
|
urlIsValid: urlMatches(
|
|
/^\/poll\/[a-zA-Z0-9]{10}\/participation\?encryptionKey=[a-zA-Z0-9]{40}$/,
|
|
),
|
|
};
|
|
|
|
export default create(definition);
|