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
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-07-05 14:45:56 +0300
committerFilipa Lacerda <filipa@gitlab.com>2019-07-05 14:45:56 +0300
commit9be879c174450b2ba2c1968d9b94cce0de95aa80 (patch)
treea78f0ffce1d4bb2b1722bc1fbbdf5453beec2e04 /spec
parenta522515688eda75c3420fd83b27bee695b708e71 (diff)
parentfad92a2ecd943e52323e9e978df84ba963057a6e (diff)
Merge branch 'fix-divergence-graph-error' into 'master'
Fix divergence graph loading error Closes #64143 See merge request gitlab-org/gitlab-ce!30393
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/branches/divergence_graph_spec.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/frontend/branches/divergence_graph_spec.js b/spec/frontend/branches/divergence_graph_spec.js
index 4ed77c3a036..8283bc966e4 100644
--- a/spec/frontend/branches/divergence_graph_spec.js
+++ b/spec/frontend/branches/divergence_graph_spec.js
@@ -10,12 +10,14 @@ describe('Divergence graph', () => {
mock.onGet('/-/diverging_counts').reply(200, {
master: { ahead: 1, behind: 1 },
+ 'test/hello-world': { ahead: 1, behind: 1 },
});
jest.spyOn(axios, 'get');
document.body.innerHTML = `
- <div class="js-branch-item" data-name="master"></div>
+ <div class="js-branch-item" data-name="master"><div class="js-branch-divergence-graph"></div></div>
+ <div class="js-branch-item" data-name="test/hello-world"><div class="js-branch-divergence-graph"></div></div>
`;
});
@@ -26,7 +28,13 @@ describe('Divergence graph', () => {
it('calls axos get with list of branch names', () =>
init('/-/diverging_counts').then(() => {
expect(axios.get).toHaveBeenCalledWith('/-/diverging_counts', {
- params: { names: ['master'] },
+ params: { names: ['master', 'test/hello-world'] },
});
}));
+
+ it('creates Vue components', () =>
+ init('/-/diverging_counts').then(() => {
+ expect(document.querySelector('[data-name="master"]').innerHTML).not.toEqual('');
+ expect(document.querySelector('[data-name="test/hello-world"]').innerHTML).not.toEqual('');
+ }));
});