Fix e2e tests
This commit is contained in:
parent
654ffdc8f3
commit
623919719d
|
|
@ -8,7 +8,7 @@ describe('The Login Page', () => {
|
||||||
// cy.assertStartPage();
|
// cy.assertStartPage();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
it.skip('user sees error message if username is omitted', () => {
|
it('user sees error message if username is omitted', () => {
|
||||||
const username = '';
|
const username = '';
|
||||||
const password = 'test';
|
const password = 'test';
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ describe('The Login Page', () => {
|
||||||
cy.get('[data-cy=email-local-errors]').contains('E-Mail ist ein Pflichtfeld');
|
cy.get('[data-cy=email-local-errors]').contains('E-Mail ist ein Pflichtfeld');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('user sees error message if password is omitted', () => {
|
it('user sees error message if password is omitted', () => {
|
||||||
const username = 'test';
|
const username = 'test';
|
||||||
const password = '';
|
const password = '';
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ describe('The Login Page', () => {
|
||||||
cy.get('[data-cy=password-local-errors]').contains('Passwort ist ein Pflichtfeld');
|
cy.get('[data-cy=password-local-errors]').contains('Passwort ist ein Pflichtfeld');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('user sees error message if credentials are invalid', () => {
|
it('user sees error message if credentials are invalid', () => {
|
||||||
const username = 'test';
|
const username = 'test';
|
||||||
const password = '12345';
|
const password = '12345';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ describe('Email Verification', () => {
|
||||||
|
|
||||||
cy.visit('/license-activation');
|
cy.visit('/license-activation');
|
||||||
redeemCoupon('');
|
redeemCoupon('');
|
||||||
cy.get('[data-cy="coupon-local-errors"]').contains('Coupon ist ein Pflichtfeld');
|
cy.get('[data-cy="coupon-local-errors"]').contains('Coupon-Code ist ein Pflichtfeld');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('displays error if coupon input is wrong', () => {
|
it('displays error if coupon input is wrong', () => {
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const {ValidationProvider} = () => import('vee-validate');
|
import {extend, localize, ValidationProvider} from 'vee-validate';
|
||||||
const {configureValidation} = () => import('@/validation');
|
import de from 'vee-validate/dist/locale/de.json';
|
||||||
|
import {required} from 'vee-validate/dist/rules';
|
||||||
|
|
||||||
|
extend('required', required);
|
||||||
|
|
||||||
|
localize('de', {
|
||||||
|
...de,
|
||||||
|
names: {
|
||||||
|
password: 'Passwort',
|
||||||
|
email: 'E-Mail',
|
||||||
|
coupon: 'Coupon-Code'
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// todo: use this in beta-login, license-activation and PasswordChangeForm
|
// todo: use this in beta-login, license-activation and PasswordChangeForm
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -78,7 +90,6 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
configureValidation();
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import VueVimeoPlayer from 'vue-vimeo-player';
|
||||||
import apolloClientFactory from './graphql/client';
|
import apolloClientFactory from './graphql/client';
|
||||||
import VueApollo from 'vue-apollo';
|
import VueApollo from 'vue-apollo';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
import {router, postLoginRedirectUrlKey} from './router';
|
import {postLoginRedirectUrlKey, router} from './router';
|
||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
import VueScrollTo from 'vue-scrollto';
|
import VueScrollTo from 'vue-scrollto';
|
||||||
import {dateFilter, dateTimeFilter} from './filters/date-filter';
|
import {dateFilter, dateTimeFilter} from './filters/date-filter';
|
||||||
|
|
@ -16,6 +16,27 @@ import VueRemoveEdges from '@/plugins/edges';
|
||||||
import VueMatomo from 'vue-matomo';
|
import VueMatomo from 'vue-matomo';
|
||||||
import VueToast from 'vue-toast-notification';
|
import VueToast from 'vue-toast-notification';
|
||||||
import VueLogger from 'vuejs-logger';
|
import VueLogger from 'vuejs-logger';
|
||||||
|
// import {configureValidation} from '@/validation';
|
||||||
|
// import {extend, localize} from 'vee-validate';
|
||||||
|
// import {confirmed, double, email, min, required} from 'vee-validate/dist/rules';
|
||||||
|
// import de from 'vee-validate/dist/locale/de.json';
|
||||||
|
|
||||||
|
// extend('required', required);
|
||||||
|
// extend('min', min);
|
||||||
|
// extend('decimal', double);
|
||||||
|
// extend('confirmed', confirmed);
|
||||||
|
// extend('email', email);
|
||||||
|
//
|
||||||
|
// localize('de', {
|
||||||
|
// de: {
|
||||||
|
// ...de,
|
||||||
|
// names: {
|
||||||
|
// password: 'Password',
|
||||||
|
// email: 'E-Mail',
|
||||||
|
// coupon: 'Coupon',
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
const isProduction = process.env.NODE_ENV === 'production';
|
const isProduction = process.env.NODE_ENV === 'production';
|
||||||
|
|
@ -29,20 +50,20 @@ Vue.use(VueLogger, {
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
logLevel: isProduction ? 'error' : 'debug',
|
logLevel: isProduction ? 'error' : 'debug',
|
||||||
stringifyArguments: false,
|
stringifyArguments: false,
|
||||||
showConsoleColors: true
|
showConsoleColors: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
Vue.use(VueScrollTo, {
|
Vue.use(VueScrollTo, {
|
||||||
duration: 500,
|
duration: 500,
|
||||||
easing: 'ease-out',
|
easing: 'ease-out',
|
||||||
offset: -50
|
offset: -50,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (process.env.MATOMO_HOST) {
|
if (process.env.MATOMO_HOST) {
|
||||||
Vue.use(VueMatomo, {
|
Vue.use(VueMatomo, {
|
||||||
host: process.env.MATOMO_HOST,
|
host: process.env.MATOMO_HOST,
|
||||||
siteId: process.env.MATOMO_SITE_ID,
|
siteId: process.env.MATOMO_SITE_ID,
|
||||||
router: router
|
router: router,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,9 +75,9 @@ const privateApolloClient = apolloClientFactory('/api/graphql/', networkErrorCal
|
||||||
|
|
||||||
const apolloProvider = new VueApollo({
|
const apolloProvider = new VueApollo({
|
||||||
clients: {
|
clients: {
|
||||||
publicClient: publicApolloClient
|
publicClient: publicApolloClient,
|
||||||
},
|
},
|
||||||
defaultClient: privateApolloClient
|
defaultClient: privateApolloClient,
|
||||||
});
|
});
|
||||||
|
|
||||||
Vue.filter('date', dateFilter);
|
Vue.filter('date', dateFilter);
|
||||||
|
|
@ -160,5 +181,5 @@ new Vue({
|
||||||
store,
|
store,
|
||||||
router,
|
router,
|
||||||
provide: apolloProvider.provide(),
|
provide: apolloProvider.provide(),
|
||||||
render: h => h(App)
|
render: h => h(App),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button
|
<button
|
||||||
:disabled="invalid"
|
|
||||||
class="button button--primary button--big actions__submit"
|
class="button button--primary button--big actions__submit"
|
||||||
data-cy="login-button">Anmelden
|
data-cy="login-button">Anmelden
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -48,14 +47,13 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BETA_LOGIN_MUTATION from '@/graphql/gql/mutations/betaLogin.gql';
|
import BETA_LOGIN_MUTATION from '@/graphql/gql/mutations/betaLogin.gql';
|
||||||
const {ValidationObserver, ValidationProvider} = () => import('vee-validate');
|
import {ValidationObserver} from 'vee-validate';
|
||||||
|
|
||||||
const ValidatedInput = () => import('@/components/validation/ValidatedInput');
|
const ValidatedInput = () => import('@/components/validation/ValidatedInput');
|
||||||
const {configureValidation} = () => import('@/validation');
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ValidatedInput,
|
ValidatedInput,
|
||||||
ValidationProvider,
|
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -70,10 +68,6 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
|
||||||
configureValidation();
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
validateBeforeSubmit() {
|
validateBeforeSubmit() {
|
||||||
this.submitted = true;
|
this.submitted = true;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<loading-button
|
<loading-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:disabled="invalid"
|
|
||||||
class="actions__submit"
|
class="actions__submit"
|
||||||
data-cy="coupon-button"
|
data-cy="coupon-button"
|
||||||
label="Coupon abschicken"
|
label="Coupon abschicken"
|
||||||
|
|
@ -59,13 +58,13 @@
|
||||||
import REDEEM_COUPON from '@/graphql/gql/mutations/redeemCoupon.gql';
|
import REDEEM_COUPON from '@/graphql/gql/mutations/redeemCoupon.gql';
|
||||||
import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
|
import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
|
||||||
import LoadingButton from '@/components/LoadingButton';
|
import LoadingButton from '@/components/LoadingButton';
|
||||||
|
import {ValidationObserver} from 'vee-validate';
|
||||||
|
|
||||||
import me from '@/mixins/me';
|
import me from '@/mixins/me';
|
||||||
import logout from '@/mixins/logout';
|
import logout from '@/mixins/logout';
|
||||||
import pageTitleMixin from '@/mixins/page-title';
|
import pageTitleMixin from '@/mixins/page-title';
|
||||||
|
|
||||||
const ValidatedInput = () => import('@/components/validation/ValidatedInput');
|
const ValidatedInput = () => import('@/components/validation/ValidatedInput');
|
||||||
const {ValidationObserver} = () => import('vee-validate');
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [me, logout, pageTitleMixin],
|
mixins: [me, logout, pageTitleMixin],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue