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