Fix tests

This commit is contained in:
Wolfgang Huß 2019-10-24 12:54:51 +02:00
parent 114c7531bb
commit d2fd33b102
6 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,2 @@
// please change also version in file "webapp/constants/terms-and-conditions-version.js"
export const VERSION = '0.0.3'

View File

@ -1,4 +1,5 @@
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps' import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'
import { VERSION } from '../../constants/terms-and-conditions-version.js'
/* global cy */ /* global cy */
@ -31,7 +32,7 @@ Given('I am logged in with a {string} role', role => {
cy.factory().create('User', { cy.factory().create('User', {
email: `${role}@example.org`, email: `${role}@example.org`,
password: '1234', password: '1234',
termsAndConditionsAgreedVersion: "0.0.2", termsAndConditionsAgreedVersion: VERSION,
role role
}) })
cy.login({ cy.login({

View File

@ -4,6 +4,7 @@ import {
Then Then
} from "cypress-cucumber-preprocessor/steps"; } from "cypress-cucumber-preprocessor/steps";
import helpers from "../../support/helpers"; import helpers from "../../support/helpers";
import { VERSION } from '../../constants/terms-and-conditions-version.js'
/* global cy */ /* global cy */
@ -14,7 +15,7 @@ let loginCredentials = {
password: "1234" password: "1234"
}; };
const termsAndConditionsAgreedVersion = { const termsAndConditionsAgreedVersion = {
termsAndConditionsAgreedVersion: "0.0.2" termsAndConditionsAgreedVersion: VERSION
}; };
const narratorParams = { const narratorParams = {
id: 'id-of-peter-pan', id: 'id-of-peter-pan',

View File

@ -1,4 +1,5 @@
import { config, mount, createLocalVue } from '@vue/test-utils' import { config, mount, createLocalVue } from '@vue/test-utils'
import { VERSION } from '~/constants/terms-and-conditions-version.js'
import CreateUserAccount from './CreateUserAccount' import CreateUserAccount from './CreateUserAccount'
import { SignupVerificationMutation } from '~/graphql/Registration.js' import { SignupVerificationMutation } from '~/graphql/Registration.js'
import Styleguide from '@human-connection/styleguide' import Styleguide from '@human-connection/styleguide'
@ -81,7 +82,7 @@ describe('CreateUserAccount', () => {
email: 'sixseven@example.org', email: 'sixseven@example.org',
nonce: '666777', nonce: '666777',
password: 'hellopassword', password: 'hellopassword',
termsAndConditionsAgreedVersion: '0.0.2', termsAndConditionsAgreedVersion: VERSION,
locale: 'en', locale: 'en',
}, },
}) })

View File

@ -1 +1,2 @@
// please change also version in file "cypress/constants/terms-and-conditions-version.js"
export const VERSION = '0.0.3' export const VERSION = '0.0.3'

View File

@ -26,6 +26,7 @@ export default {
}, },
data() { data() {
return { return {
// if you change terms and conditions please change also version in file "webapp/constants/terms-and-conditions-version.js"
sections: [ sections: [
'terms-of-service', 'terms-of-service',
'use-and-license', 'use-and-license',