Merge branch 'master' into rewrite-create-options
This commit is contained in:
commit
33d641623a
2 changed files with 49 additions and 49 deletions
|
@ -10,13 +10,13 @@ import formattedDateHelper from 'croodle/helpers/formatted-date';
|
|||
let application, server;
|
||||
|
||||
module('Acceptance | view evaluation', {
|
||||
beforeEach: function() {
|
||||
beforeEach() {
|
||||
application = startApp();
|
||||
application.__container__.lookup('adapter:application').__proto__.namespace = '';
|
||||
|
||||
server = new Pretender();
|
||||
},
|
||||
afterEach: function() {
|
||||
afterEach() {
|
||||
server.shutdown();
|
||||
|
||||
Ember.run(application, 'destroy');
|
||||
|
@ -24,8 +24,8 @@ module('Acceptance | view evaluation', {
|
|||
});
|
||||
|
||||
test('evaluation summary is not present for poll without participants', function(assert) {
|
||||
let id = 'test',
|
||||
encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
let id = 'test';
|
||||
let encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
|
||||
server.get(`/polls/${id}`, function() {
|
||||
return serverGetPolls(
|
||||
|
@ -49,8 +49,8 @@ test('evaluation summary is not present for poll without participants', function
|
|||
});
|
||||
|
||||
test('evaluation is correct', function(assert) {
|
||||
var id = 'test',
|
||||
encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
let id = 'test';
|
||||
let encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
|
||||
server.get(`/polls/${id}`, function() {
|
||||
return serverGetPolls(
|
||||
|
@ -58,21 +58,21 @@ test('evaluation is correct', function(assert) {
|
|||
id,
|
||||
answers: [
|
||||
{
|
||||
type: "yes",
|
||||
labelTranslation: "answerTypes.yes.label",
|
||||
icon: "glyphicon glyphicon-thumbs-up",
|
||||
label: "Yes"
|
||||
type: 'yes',
|
||||
labelTranslation: 'answerTypes.yes.label',
|
||||
icon: 'glyphicon glyphicon-thumbs-up',
|
||||
label: 'Yes'
|
||||
},
|
||||
{
|
||||
type: "no",
|
||||
labelTranslation: "answerTypes.no.label",
|
||||
icon: "glyphicon glyphicon-thumbs-down",
|
||||
label: "No"
|
||||
type: 'no',
|
||||
labelTranslation: 'answerTypes.no.label',
|
||||
icon: 'glyphicon glyphicon-thumbs-down',
|
||||
label: 'No'
|
||||
}
|
||||
],
|
||||
options: [
|
||||
{title: '2015-12-12'},
|
||||
{title: '2016-01-01'}
|
||||
{ title: '2015-12-12' },
|
||||
{ title: '2016-01-01' }
|
||||
],
|
||||
users: [
|
||||
{
|
||||
|
@ -80,38 +80,38 @@ test('evaluation is correct', function(assert) {
|
|||
name: 'Maximilian',
|
||||
selections: [
|
||||
{
|
||||
type: "yes",
|
||||
labelTranslation: "answerTypes.yes.label",
|
||||
icon: "glyphicon glyphicon-thumbs-up",
|
||||
label: "Yes"
|
||||
type: 'yes',
|
||||
labelTranslation: 'answerTypes.yes.label',
|
||||
icon: 'glyphicon glyphicon-thumbs-up',
|
||||
label: 'Yes'
|
||||
},
|
||||
{
|
||||
type: "yes",
|
||||
labelTranslation: "answerTypes.yes.label",
|
||||
icon: "glyphicon glyphicon-thumbs-up",
|
||||
label: "Yes"
|
||||
type: 'yes',
|
||||
labelTranslation: 'answerTypes.yes.label',
|
||||
icon: 'glyphicon glyphicon-thumbs-up',
|
||||
label: 'Yes'
|
||||
}
|
||||
],
|
||||
creationDate: "2015-01-01T00:00:00.000Z"
|
||||
creationDate: '2015-01-01T00:00:00.000Z'
|
||||
},
|
||||
{
|
||||
id: `${id}_1`,
|
||||
name: 'Peter',
|
||||
selections: [
|
||||
{
|
||||
type: "yes",
|
||||
labelTranslation: "answerTypes.yes.label",
|
||||
icon: "glyphicon glyphicon-thumbs-up",
|
||||
label: "Yes"
|
||||
type: 'yes',
|
||||
labelTranslation: 'answerTypes.yes.label',
|
||||
icon: 'glyphicon glyphicon-thumbs-up',
|
||||
label: 'Yes'
|
||||
},
|
||||
{
|
||||
id: "no",
|
||||
labelTranslation: "answerTypes.yes.label",
|
||||
icon: "glyphicon glyphicon-thumbs-up",
|
||||
label: "Yes"
|
||||
id: 'no',
|
||||
labelTranslation: 'answerTypes.yes.label',
|
||||
icon: 'glyphicon glyphicon-thumbs-up',
|
||||
label: 'Yes'
|
||||
}
|
||||
],
|
||||
creationDate: "2015-08-01T00:00:00.000Z"
|
||||
creationDate: '2015-08-01T00:00:00.000Z'
|
||||
}
|
||||
]
|
||||
}, encryptionKey
|
||||
|
|
|
@ -9,13 +9,13 @@ import serverGetPolls from '../helpers/server-get-polls';
|
|||
let application, server;
|
||||
|
||||
module('Acceptance | view poll', {
|
||||
beforeEach: function() {
|
||||
beforeEach() {
|
||||
application = startApp();
|
||||
application.__container__.lookup('adapter:application').__proto__.namespace = '';
|
||||
|
||||
server = new Pretender();
|
||||
},
|
||||
afterEach: function() {
|
||||
afterEach() {
|
||||
server.shutdown();
|
||||
|
||||
Ember.run(application, 'destroy');
|
||||
|
@ -23,8 +23,8 @@ module('Acceptance | view poll', {
|
|||
});
|
||||
|
||||
test('view poll url', function(assert) {
|
||||
var id = 'test',
|
||||
encryptionKey = 'abcdefghijklmnopqrstuvwxyz012345789';
|
||||
let id = 'test';
|
||||
let encryptionKey = 'abcdefghijklmnopqrstuvwxyz012345789';
|
||||
|
||||
server.get(`/polls/${id}`, function() {
|
||||
return serverGetPolls({ id }, encryptionKey);
|
||||
|
@ -41,16 +41,16 @@ test('view poll url', function(assert) {
|
|||
});
|
||||
|
||||
test('view a poll with dates', function(assert) {
|
||||
var id = 'test',
|
||||
encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
let id = 'test';
|
||||
let encryptionKey = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
|
||||
server.get(`/polls/${id}`, function() {
|
||||
return serverGetPolls(
|
||||
{
|
||||
id,
|
||||
options: [
|
||||
{title: '2015-12-12'},
|
||||
{title: '2016-01-01'}
|
||||
{ title: '2015-12-12' },
|
||||
{ title: '2016-01-01' }
|
||||
]
|
||||
}, encryptionKey
|
||||
);
|
||||
|
@ -85,9 +85,9 @@ test('view a poll with dates and times', function(assert) {
|
|||
id,
|
||||
isDateTime: true,
|
||||
options: [
|
||||
{title: '2015-12-12T11:11:00.000Z'},
|
||||
{title: '2015-12-12T13:13:00.000Z'},
|
||||
{title: '2016-01-01T11:11:00.000Z'}
|
||||
{ title: '2015-12-12T11:11:00.000Z' },
|
||||
{ title: '2015-12-12T13:13:00.000Z' },
|
||||
{ title: '2016-01-01T11:11:00.000Z' }
|
||||
],
|
||||
timezone: timezone
|
||||
}, encryptionKey
|
||||
|
@ -125,8 +125,8 @@ test('view a poll while timezone differs from the one poll got created in and ch
|
|||
id,
|
||||
isDateTime: true,
|
||||
options: [
|
||||
{title: '2015-12-12T11:11:00.000Z'},
|
||||
{title: '2016-01-01T11:11:00.000Z'}
|
||||
{ title: '2015-12-12T11:11:00.000Z' },
|
||||
{ title: '2016-01-01T11:11:00.000Z' }
|
||||
],
|
||||
timezone: timezonePoll
|
||||
}, encryptionKey
|
||||
|
@ -186,8 +186,8 @@ test('view a poll while timezone differs from the one poll got created in and ch
|
|||
id,
|
||||
isDateTime: true,
|
||||
options: [
|
||||
{title: '2015-12-12T11:11:00.000Z'},
|
||||
{title: '2016-01-01T11:11:00.000Z'}
|
||||
{ title: '2015-12-12T11:11:00.000Z' },
|
||||
{ title: '2016-01-01T11:11:00.000Z' }
|
||||
],
|
||||
timezone: timezonePoll
|
||||
}, encryptionKey
|
||||
|
|
Loading…
Reference in a new issue