Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-06 00:09:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-06 00:09:08 +0300
commit91264a675246bc77a83322a2eff560eeaba7ce9a (patch)
tree583b137c7c03ece1be11f35de7b39b8b3f7e4560 /spec/frontend/ide/components
parent51bc2d8e703f667483505f0e3d074f442e1f48e6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ide/components')
-rw-r--r--spec/frontend/ide/components/commit_sidebar/list_item_spec.js28
1 files changed, 14 insertions, 14 deletions
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');