mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Linting for new tests and LoginForm changes.
This commit is contained in:
parent
f71fb6b07b
commit
8d1931f94c
@ -70,9 +70,8 @@ describe('LoginForm', () => {
|
|||||||
await Vue.nextTick()
|
await Vue.nextTick()
|
||||||
await expect(wrapper.find('input[name = "password"]').attributes('type')).toEqual('text')
|
await expect(wrapper.find('input[name = "password"]').attributes('type')).toEqual('text')
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('Click on show password icon, icon change', () => {
|
describe('Click on show password icon, icon change', () => {
|
||||||
const wrapper = Wrapper()
|
const wrapper = Wrapper()
|
||||||
it('shows eye icon by default', () => {
|
it('shows eye icon by default', () => {
|
||||||
@ -86,12 +85,12 @@ describe('LoginForm', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('Focus returns to password input container after show password click', () =>{
|
describe('Focus returns to password input container after show password click', () => {
|
||||||
const wrapper = Wrapper()
|
const wrapper = Wrapper()
|
||||||
const componentToGetFocus = wrapper.find('input[name ="password"]')
|
const componentToGetFocus = wrapper.find('input[name ="password"]')
|
||||||
it('Focus is on the password field container after click', async () => {
|
it('Focus is on the password field container after click', async () => {
|
||||||
wrapper.find('span.click-wrapper').trigger('click', {
|
wrapper.find('span.click-wrapper').trigger('click', {
|
||||||
relateTarget: componentToGetFocus
|
relateTarget: componentToGetFocus,
|
||||||
})
|
})
|
||||||
await Vue.nextTick()
|
await Vue.nextTick()
|
||||||
await expect(wrapper.emitted('focus')).toBeTruthy()
|
await expect(wrapper.emitted('focus')).toBeTruthy()
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
name="email"
|
name="email"
|
||||||
icon="envelope"
|
icon="envelope"
|
||||||
/>
|
/>
|
||||||
<div class="password-wrapper" >
|
<div class="password-wrapper">
|
||||||
<ds-input
|
<ds-input
|
||||||
v-model="form.password"
|
v-model="form.password"
|
||||||
:disabled="pending"
|
:disabled="pending"
|
||||||
@ -33,7 +33,7 @@
|
|||||||
/>
|
/>
|
||||||
<span class="click-wrapper" @click="toggleShowPassword">
|
<span class="click-wrapper" @click="toggleShowPassword">
|
||||||
<span class="icon-wrapper" :data-test="iconName">
|
<span class="icon-wrapper" :data-test="iconName">
|
||||||
<base-icon class="toggle-icon" :name="iconName" />
|
<base-icon class="toggle-icon" :name="iconName" />
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -79,7 +79,7 @@ export default {
|
|||||||
},
|
},
|
||||||
iconName() {
|
iconName() {
|
||||||
return this.showPassword ? 'eye-slash' : 'eye'
|
return this.showPassword ? 'eye-slash' : 'eye'
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
@ -146,7 +146,6 @@ export default {
|
|||||||
.click-wrapper:hover {
|
.click-wrapper:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
background-color: $background-color-base;
|
background-color: $background-color-base;
|
||||||
border: $input-border-size solid $border-color-active;
|
border: $input-border-size solid $border-color-active;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user