From 91264a675246bc77a83322a2eff560eeaba7ce9a Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 5 Oct 2022 21:09:08 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../components/commit_sidebar/list_item_spec.js | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'spec/frontend/ide/components') diff --git a/spec/frontend/ide/components/commit_sidebar/list_item_spec.js b/spec/frontend/ide/components/commit_sidebar/list_item_spec.js index f71f6a5e5c7..c9571d39acb 100644 --- a/spec/frontend/ide/components/commit_sidebar/list_item_spec.js +++ b/spec/frontend/ide/components/commit_sidebar/list_item_spec.js @@ -10,7 +10,7 @@ import { file } from '../../helpers'; describe('Multi-file editor commit sidebar list item', () => { let wrapper; - let f; + let testFile; let findPathEl; let store; let router; @@ -21,15 +21,15 @@ describe('Multi-file editor commit sidebar list item', () => { router = createRouter(store); - f = file('test-file'); + testFile = file('test-file'); - store.state.entries[f.path] = f; + store.state.entries[testFile.path] = testFile; wrapper = mount(ListItem, { store, propsData: { - file: f, - activeFileKey: `staged-${f.key}`, + file: testFile, + activeFileKey: `staged-${testFile.key}`, }, }); @@ -43,21 +43,21 @@ describe('Multi-file editor commit sidebar list item', () => { const findPathText = () => trimText(findPathEl.text()); it('renders file path', () => { - expect(findPathText()).toContain(f.path); + expect(findPathText()).toContain(testFile.path); }); it('correctly renders renamed entries', async () => { - Vue.set(f, 'prevName', 'Old name'); + Vue.set(testFile, 'prevName', 'Old name'); await nextTick(); - expect(findPathText()).toEqual(`Old name → ${f.name}`); + expect(findPathText()).toEqual(`Old name → ${testFile.name}`); }); it('correctly renders entry, the name of which did not change after rename (as within a folder)', async () => { - Vue.set(f, 'prevName', f.name); + Vue.set(testFile, 'prevName', testFile.name); await nextTick(); - expect(findPathText()).toEqual(f.name); + expect(findPathText()).toEqual(testFile.name); }); it('opens a closed file in the editor when clicking the file path', async () => { @@ -86,14 +86,14 @@ describe('Multi-file editor commit sidebar list item', () => { }); it('is addition when is a tempFile', async () => { - f.tempFile = true; + testFile.tempFile = true; await nextTick(); expect(getIconName()).toBe('file-addition'); }); it('is deletion when is deleted', async () => { - f.deleted = true; + testFile.deleted = true; await nextTick(); expect(getIconName()).toBe('file-deletion'); @@ -108,14 +108,14 @@ describe('Multi-file editor commit sidebar list item', () => { }); it('is addition when is a tempFile', async () => { - f.tempFile = true; + testFile.tempFile = true; await nextTick(); expect(getIconClass()).toContain('ide-file-addition'); }); it('returns deletion when is deleted', async () => { - f.deleted = true; + testFile.deleted = true; await nextTick(); expect(getIconClass()).toContain('ide-file-deletion'); -- cgit v1.2.3