diff --git a/cypress/constants/terms-and-conditions-version.js b/cypress/constants/terms-and-conditions-version.js new file mode 100644 index 000000000..87b00b8dc --- /dev/null +++ b/cypress/constants/terms-and-conditions-version.js @@ -0,0 +1,2 @@ +// please change also version in file "webapp/constants/terms-and-conditions-version.js" +export const VERSION = '0.0.3' \ No newline at end of file diff --git a/cypress/integration/common/report.js b/cypress/integration/common/report.js index c32d5e10a..17481befe 100644 --- a/cypress/integration/common/report.js +++ b/cypress/integration/common/report.js @@ -1,4 +1,5 @@ import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps' +import { VERSION } from '../../constants/terms-and-conditions-version.js' /* global cy */ @@ -31,7 +32,7 @@ Given('I am logged in with a {string} role', role => { cy.factory().create('User', { email: `${role}@example.org`, password: '1234', - termsAndConditionsAgreedVersion: "0.0.2", + termsAndConditionsAgreedVersion: VERSION, role }) cy.login({ diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index ab1790756..493c54e38 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -4,6 +4,7 @@ import { Then } from "cypress-cucumber-preprocessor/steps"; import helpers from "../../support/helpers"; +import { VERSION } from '../../constants/terms-and-conditions-version.js' /* global cy */ @@ -14,7 +15,7 @@ let loginCredentials = { password: "1234" }; const termsAndConditionsAgreedVersion = { - termsAndConditionsAgreedVersion: "0.0.2" + termsAndConditionsAgreedVersion: VERSION }; const narratorParams = { id: 'id-of-peter-pan', diff --git a/webapp/components/Registration/CreateUserAccount.spec.js b/webapp/components/Registration/CreateUserAccount.spec.js index fb9bf00f8..7bc2aba28 100644 --- a/webapp/components/Registration/CreateUserAccount.spec.js +++ b/webapp/components/Registration/CreateUserAccount.spec.js @@ -1,4 +1,5 @@ import { config, mount, createLocalVue } from '@vue/test-utils' +import { VERSION } from '~/constants/terms-and-conditions-version.js' import CreateUserAccount from './CreateUserAccount' import { SignupVerificationMutation } from '~/graphql/Registration.js' import Styleguide from '@human-connection/styleguide' @@ -81,7 +82,7 @@ describe('CreateUserAccount', () => { email: 'sixseven@example.org', nonce: '666777', password: 'hellopassword', - termsAndConditionsAgreedVersion: '0.0.2', + termsAndConditionsAgreedVersion: VERSION, locale: 'en', }, }) diff --git a/webapp/constants/terms-and-conditions-version.js b/webapp/constants/terms-and-conditions-version.js index 1f81a3114..706a81aac 100644 --- a/webapp/constants/terms-and-conditions-version.js +++ b/webapp/constants/terms-and-conditions-version.js @@ -1 +1,2 @@ +// please change also version in file "cypress/constants/terms-and-conditions-version.js" export const VERSION = '0.0.3' diff --git a/webapp/pages/terms-and-conditions.vue b/webapp/pages/terms-and-conditions.vue index c664d1015..10d805710 100644 --- a/webapp/pages/terms-and-conditions.vue +++ b/webapp/pages/terms-and-conditions.vue @@ -26,6 +26,7 @@ export default { }, data() { return { + // if you change terms and conditions please change also version in file "webapp/constants/terms-and-conditions-version.js" sections: [ 'terms-of-service', 'use-and-license',