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:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/repository
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/repository')
-rw-r--r--spec/frontend/repository/components/breadcrumbs_spec.js16
-rw-r--r--spec/frontend/repository/components/directory_download_links_spec.js5
-rw-r--r--spec/frontend/repository/components/last_commit_spec.js10
-rw-r--r--spec/frontend/repository/utils/dom_spec.js2
4 files changed, 19 insertions, 14 deletions
diff --git a/spec/frontend/repository/components/breadcrumbs_spec.js b/spec/frontend/repository/components/breadcrumbs_spec.js
index 38e5c9aaca5..a0dc608ddc9 100644
--- a/spec/frontend/repository/components/breadcrumbs_spec.js
+++ b/spec/frontend/repository/components/breadcrumbs_spec.js
@@ -36,23 +36,15 @@ describe('Repository breadcrumbs component', () => {
it('escapes hash in directory path', () => {
factory('app/assets/javascripts#');
- expect(
- vm
- .findAll(RouterLinkStub)
- .at(3)
- .props('to'),
- ).toEqual('/-/tree/app/assets/javascripts%23');
+ expect(vm.findAll(RouterLinkStub).at(3).props('to')).toEqual(
+ '/-/tree/app/assets/javascripts%23',
+ );
});
it('renders last link as active', () => {
factory('app/assets');
- expect(
- vm
- .findAll(RouterLinkStub)
- .at(2)
- .attributes('aria-current'),
- ).toEqual('page');
+ expect(vm.findAll(RouterLinkStub).at(2).attributes('aria-current')).toEqual('page');
});
it('does not render add to tree dropdown when permissions are false', () => {
diff --git a/spec/frontend/repository/components/directory_download_links_spec.js b/spec/frontend/repository/components/directory_download_links_spec.js
index 4d70b44de08..72c4165c2e9 100644
--- a/spec/frontend/repository/components/directory_download_links_spec.js
+++ b/spec/frontend/repository/components/directory_download_links_spec.js
@@ -7,7 +7,10 @@ function factory(currentPath) {
vm = shallowMount(DirectoryDownloadLinks, {
propsData: {
currentPath,
- links: [{ text: 'zip', path: 'http://test.com/' }, { text: 'tar', path: 'http://test.com/' }],
+ links: [
+ { text: 'zip', path: 'http://test.com/' },
+ { text: 'tar', path: 'http://test.com/' },
+ ],
},
});
}
diff --git a/spec/frontend/repository/components/last_commit_spec.js b/spec/frontend/repository/components/last_commit_spec.js
index ccba0982c26..fe77057c3d4 100644
--- a/spec/frontend/repository/components/last_commit_spec.js
+++ b/spec/frontend/repository/components/last_commit_spec.js
@@ -131,6 +131,16 @@ describe('Repository last commit component', () => {
});
});
+ it('strips the first newline of the description', async () => {
+ factory(createCommitData({ descriptionHtml: '&#x000A;Update ADOPTERS.md' }));
+
+ await vm.vm.$nextTick();
+
+ expect(vm.find('.commit-row-description').html()).toBe(
+ '<pre class="commit-row-description gl-mb-3">Update ADOPTERS.md</pre>',
+ );
+ });
+
it('renders the signature HTML as returned by the backend', () => {
factory(createCommitData({ signatureHtml: '<button>Verified</button>' }));
diff --git a/spec/frontend/repository/utils/dom_spec.js b/spec/frontend/repository/utils/dom_spec.js
index 26ed57f0392..f9e619a82d1 100644
--- a/spec/frontend/repository/utils/dom_spec.js
+++ b/spec/frontend/repository/utils/dom_spec.js
@@ -1,5 +1,5 @@
import { TEST_HOST } from 'helpers/test_constants';
-import { setHTMLFixture } from '../../helpers/fixtures';
+import { setHTMLFixture } from 'helpers/fixtures';
import { updateElementsVisibility, updateFormAction } from '~/repository/utils/dom';
describe('updateElementsVisibility', () => {