diff options
Diffstat (limited to 'spec/frontend/profile/account')
-rw-r--r-- | spec/frontend/profile/account/components/delete_account_modal_spec.js | 20 | ||||
-rw-r--r-- | spec/frontend/profile/account/components/update_username_spec.js | 2 |
2 files changed, 9 insertions, 13 deletions
diff --git a/spec/frontend/profile/account/components/delete_account_modal_spec.js b/spec/frontend/profile/account/components/delete_account_modal_spec.js index 7834456f7c4..63e27473979 100644 --- a/spec/frontend/profile/account/components/delete_account_modal_spec.js +++ b/spec/frontend/profile/account/components/delete_account_modal_spec.js @@ -56,7 +56,7 @@ describe('DeleteAccountModal component', () => { const findModal = () => wrapper.find(GlModalStub); describe('with password confirmation', () => { - beforeEach(done => { + beforeEach((done) => { createWrapper({ propsData: { confirmWithPassword: true, @@ -65,12 +65,10 @@ describe('DeleteAccountModal component', () => { vm.isOpen = true; - Vue.nextTick() - .then(done) - .catch(done.fail); + Vue.nextTick().then(done).catch(done.fail); }); - it('does not accept empty password', done => { + it('does not accept empty password', (done) => { const { form, input } = findElements(); jest.spyOn(form, 'submit').mockImplementation(() => {}); input.value = ''; @@ -88,7 +86,7 @@ describe('DeleteAccountModal component', () => { .catch(done.fail); }); - it('submits form with password', done => { + it('submits form with password', (done) => { const { form, input } = findElements(); jest.spyOn(form, 'submit').mockImplementation(() => {}); input.value = 'anything'; @@ -108,7 +106,7 @@ describe('DeleteAccountModal component', () => { }); describe('with username confirmation', () => { - beforeEach(done => { + beforeEach((done) => { createWrapper({ propsData: { confirmWithPassword: false, @@ -117,12 +115,10 @@ describe('DeleteAccountModal component', () => { vm.isOpen = true; - Vue.nextTick() - .then(done) - .catch(done.fail); + Vue.nextTick().then(done).catch(done.fail); }); - it('does not accept wrong username', done => { + it('does not accept wrong username', (done) => { const { form, input } = findElements(); jest.spyOn(form, 'submit').mockImplementation(() => {}); input.value = 'this is wrong'; @@ -140,7 +136,7 @@ describe('DeleteAccountModal component', () => { .catch(done.fail); }); - it('submits form with correct username', done => { + it('submits form with correct username', (done) => { const { form, input } = findElements(); jest.spyOn(form, 'submit').mockImplementation(() => {}); input.value = username; diff --git a/spec/frontend/profile/account/components/update_username_spec.js b/spec/frontend/profile/account/components/update_username_spec.js index 45e5e0f885f..91c3c81ab30 100644 --- a/spec/frontend/profile/account/components/update_username_spec.js +++ b/spec/frontend/profile/account/components/update_username_spec.js @@ -84,7 +84,7 @@ describe('UpdateUsername component', () => { it('confirmation modal contains proper header and body', async () => { const { modal } = findElements(); - expect(modal.attributes('title')).toBe('Change username?'); + expect(modal.props('title')).toBe('Change username?'); expect(modal.text()).toContain( `You are going to change the username ${defaultProps.initialUsername} to ${newUsername}`, ); |