Remove unused variables, simplify tests
This commit is contained in:
parent
a0733d1caf
commit
edd431671f
|
|
@ -4,7 +4,6 @@ const prodEnv = require('./prod.env')
|
|||
|
||||
module.exports = merge(prodEnv, {
|
||||
NODE_ENV: '"development"',
|
||||
GOOGLE_ANALYTICS_ID: JSON.stringify(process.env.GOOGLE_ANALYTICS_ID),
|
||||
HEP_URL: JSON.stringify(process.env.HEP_URL),
|
||||
MATOMO_HOST: JSON.stringify(process.env.MATOMO_HOST),
|
||||
MATOMO_SITE_ID: JSON.stringify(process.env.MATOMO_SITE_ID),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
'use strict'
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"',
|
||||
GOOGLE_ANALYTICS_ID: JSON.stringify(process.env.GOOGLE_ANALYTICS_ID),
|
||||
HEP_URL: JSON.stringify(process.env.HEP_URL),
|
||||
MATOMO_HOST: JSON.stringify(process.env.MATOMO_HOST),
|
||||
MATOMO_SITE_ID: JSON.stringify(process.env.MATOMO_SITE_ID),
|
||||
|
|
|
|||
|
|
@ -10,12 +10,10 @@ describe('Email Verifcation', () => {
|
|||
cy.mockGraphql({
|
||||
schema: schema,
|
||||
operations: {
|
||||
Registration: variables => {
|
||||
return {
|
||||
registration: {
|
||||
message: "success",
|
||||
success: true
|
||||
}
|
||||
Registration: {
|
||||
registration: {
|
||||
message: "success",
|
||||
success: true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -35,13 +33,11 @@ describe('Email Verifcation', () => {
|
|||
schema: schema,
|
||||
// endpoint: '/api/graphql'
|
||||
operations: {
|
||||
Registration: variables => {
|
||||
return {
|
||||
Registration: {
|
||||
registration: {
|
||||
message: "invalid_key",
|
||||
success: false
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
@ -58,12 +54,10 @@ describe('Email Verifcation', () => {
|
|||
schema: schema,
|
||||
// endpoint: '/api/graphql'
|
||||
operations: {
|
||||
Registration: variables => {
|
||||
return {
|
||||
registration: {
|
||||
message: "unkown_error",
|
||||
success: false
|
||||
}
|
||||
Registration: {
|
||||
registration: {
|
||||
message: "unkown_error",
|
||||
success: false
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -80,12 +74,10 @@ describe('Email Verifcation', () => {
|
|||
schema: schema,
|
||||
// endpoint: '/api/graphql'
|
||||
operations: {
|
||||
Registration: variables => {
|
||||
return {
|
||||
registration: {
|
||||
message: "no_valid_license",
|
||||
success: false
|
||||
}
|
||||
Registration: {
|
||||
registration: {
|
||||
message: "no_valid_license",
|
||||
success: false
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ describe('Login', () => {
|
|||
|
||||
cy.get('[data-cy="login-title"]').contains('Bitte geben Sie das passende Passwort ein');
|
||||
cy.enterPassword('abcd1234');
|
||||
// As we cannot set the cookie in the right manner, we just check for the absence of erros.
|
||||
// As we cannot set the cookie in the right manner, we just check for the absence of errors.
|
||||
// In real world the user gets redirect to another page
|
||||
cy.get('[data-cy="email-local-errors"]').should('not.exist');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class Registration(relay.ClientIDMutation):
|
|||
hep_client.customer_activate(confirmation_key, user_id)
|
||||
user_data = hep_client.customers_by_id(admin_token, user_id)
|
||||
# double check if user has verified his email. If the "confirmation" field is present, the email address
|
||||
# is not verified. Note that the user should not be able to see this page without verified email.
|
||||
# is not verified.
|
||||
if 'confirmation' in user_data:
|
||||
return cls.return_fail_registration_msg('invalid_key')
|
||||
except HepClientException:
|
||||
|
|
|
|||
Loading…
Reference in New Issue