forked from verdnatura/salix-front
fix: refs #7699 fix component
This commit is contained in:
parent
9b0d1058c5
commit
60f3ea838a
|
@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import VnRow from '../ui/VnRow.vue';
|
import VnRow from '../ui/VnRow.vue';
|
||||||
import FetchData from '../FetchData.vue';
|
import FetchData from '../FetchData.vue';
|
||||||
import useNotify from 'src/composables/useNotify';
|
import useNotify from 'src/composables/useNotify';
|
||||||
import VnInputPassword from './VnInputPassword.vue';
|
import VnInputPassword from 'VnInputPassword.vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
submitFn: { type: Function, default: () => {} },
|
submitFn: { type: Function, default: () => {} },
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
||||||
import { Notify } from 'quasar';
|
import { Notify } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
import { useLogin } from 'src/composables/useLogin';
|
import { useLogin } from 'src/composables/useLogin';
|
||||||
|
|
||||||
|
@ -63,11 +63,10 @@ async function onSubmit() {
|
||||||
:rules="[(val) => (val && val.length > 0) || t('login.fieldRequired')]"
|
:rules="[(val) => (val && val.length > 0) || t('login.fieldRequired')]"
|
||||||
color="primary"
|
color="primary"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInputPassword
|
||||||
type="password"
|
|
||||||
v-model="password"
|
v-model="password"
|
||||||
:label="t('login.password')"
|
:label="t('login.password')"
|
||||||
lazy-rules
|
:toggle-visibility="true"
|
||||||
:rules="[(val) => (val && val.length > 0) || t('login.fieldRequired')]"
|
:rules="[(val) => (val && val.length > 0) || t('login.fieldRequired')]"
|
||||||
class="red"
|
class="red"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -19,6 +19,7 @@ describe('Login', () => {
|
||||||
it('should fail to log in using wrong password', () => {
|
it('should fail to log in using wrong password', () => {
|
||||||
cy.get('input[aria-label="Username"]').type('employee');
|
cy.get('input[aria-label="Username"]').type('employee');
|
||||||
cy.get('input[aria-label="Password"]').type('wrongPassword');
|
cy.get('input[aria-label="Password"]').type('wrongPassword');
|
||||||
|
cy.get('.q-field__append > .q-icon');
|
||||||
cy.get('button[type="submit"]').click();
|
cy.get('button[type="submit"]').click();
|
||||||
cy.get('.q-notification__message').should(
|
cy.get('.q-notification__message').should(
|
||||||
'have.text',
|
'have.text',
|
||||||
|
|
Loading…
Reference in New Issue