summaryrefslogtreecommitdiff
path: root/spec/frontend/profile/account
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/profile/account
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-9c92629b014f99bee07847e53f057eabe7f1fea0.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/profile/account')
-rw-r--r--spec/frontend/profile/account/components/delete_account_modal_spec.js20
-rw-r--r--spec/frontend/profile/account/components/update_username_spec.js2
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}`,
);