Commit c451b7e8 authored by Jacques Erasmus's avatar Jacques Erasmus

Update master to main

Uodated the default branch name
parent 0927b183
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
exports[`Branch divergence graph component renders ahead and behind count 1`] = ` exports[`Branch divergence graph component renders ahead and behind count 1`] = `
<div <div
class="divergence-graph px-2 d-none d-md-block" class="divergence-graph px-2 d-none d-md-block"
title="10 commits behind master, 10 commits ahead" title="10 commits behind main, 10 commits ahead"
> >
<graph-bar-stub <graph-bar-stub
count="10" count="10"
...@@ -26,7 +26,7 @@ exports[`Branch divergence graph component renders ahead and behind count 1`] = ...@@ -26,7 +26,7 @@ exports[`Branch divergence graph component renders ahead and behind count 1`] =
exports[`Branch divergence graph component renders distance count 1`] = ` exports[`Branch divergence graph component renders distance count 1`] = `
<div <div
class="divergence-graph px-2 d-none d-md-block" class="divergence-graph px-2 d-none d-md-block"
title="More than 900 commits different with master" title="More than 900 commits different with main"
> >
<graph-bar-stub <graph-bar-stub
count="900" count="900"
......
...@@ -15,7 +15,7 @@ describe('Branch divergence graph component', () => { ...@@ -15,7 +15,7 @@ describe('Branch divergence graph component', () => {
it('renders ahead and behind count', () => { it('renders ahead and behind count', () => {
factory({ factory({
defaultBranch: 'master', defaultBranch: 'main',
aheadCount: 10, aheadCount: 10,
behindCount: 10, behindCount: 10,
maxCommits: 100, maxCommits: 100,
...@@ -27,18 +27,18 @@ describe('Branch divergence graph component', () => { ...@@ -27,18 +27,18 @@ describe('Branch divergence graph component', () => {
it('sets title for ahead and behind count', () => { it('sets title for ahead and behind count', () => {
factory({ factory({
defaultBranch: 'master', defaultBranch: 'main',
aheadCount: 10, aheadCount: 10,
behindCount: 10, behindCount: 10,
maxCommits: 100, maxCommits: 100,
}); });
expect(vm.attributes('title')).toBe('10 commits behind master, 10 commits ahead'); expect(vm.attributes('title')).toBe('10 commits behind main, 10 commits ahead');
}); });
it('renders distance count', () => { it('renders distance count', () => {
factory({ factory({
defaultBranch: 'master', defaultBranch: 'main',
aheadCount: 0, aheadCount: 0,
behindCount: 0, behindCount: 0,
distance: 900, distance: 900,
...@@ -55,13 +55,13 @@ describe('Branch divergence graph component', () => { ...@@ -55,13 +55,13 @@ describe('Branch divergence graph component', () => {
${1100} | ${'999+'} ${1100} | ${'999+'}
`('sets title for $distance as $titleText', ({ distance, titleText }) => { `('sets title for $distance as $titleText', ({ distance, titleText }) => {
factory({ factory({
defaultBranch: 'master', defaultBranch: 'main',
aheadCount: 0, aheadCount: 0,
behindCount: 0, behindCount: 0,
distance, distance,
maxCommits: 100, maxCommits: 100,
}); });
expect(vm.attributes('title')).toBe(`More than ${titleText} commits different with master`); expect(vm.attributes('title')).toBe(`More than ${titleText} commits different with main`);
}); });
}); });
...@@ -9,14 +9,14 @@ describe('Divergence graph', () => { ...@@ -9,14 +9,14 @@ describe('Divergence graph', () => {
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
mock.onGet('/-/diverging_counts').reply(200, { mock.onGet('/-/diverging_counts').reply(200, {
master: { ahead: 1, behind: 1 }, main: { ahead: 1, behind: 1 },
'test/hello-world': { ahead: 1, behind: 1 }, 'test/hello-world': { ahead: 1, behind: 1 },
}); });
jest.spyOn(axios, 'get'); jest.spyOn(axios, 'get');
document.body.innerHTML = ` document.body.innerHTML = `
<div class="js-branch-item" data-name="master"><div class="js-branch-divergence-graph"></div></div> <div class="js-branch-item" data-name="main"><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> <div class="js-branch-item" data-name="test/hello-world"><div class="js-branch-divergence-graph"></div></div>
`; `;
}); });
...@@ -28,7 +28,7 @@ describe('Divergence graph', () => { ...@@ -28,7 +28,7 @@ describe('Divergence graph', () => {
it('calls axios get with list of branch names', () => it('calls axios get with list of branch names', () =>
init('/-/diverging_counts').then(() => { init('/-/diverging_counts').then(() => {
expect(axios.get).toHaveBeenCalledWith('/-/diverging_counts', { expect(axios.get).toHaveBeenCalledWith('/-/diverging_counts', {
params: { names: ['master', 'test/hello-world'] }, params: { names: ['main', 'test/hello-world'] },
}); });
})); }));
...@@ -46,7 +46,7 @@ describe('Divergence graph', () => { ...@@ -46,7 +46,7 @@ describe('Divergence graph', () => {
it('creates Vue components', () => it('creates Vue components', () =>
init('/-/diverging_counts').then(() => { init('/-/diverging_counts').then(() => {
expect(document.querySelector('[data-name="master"]').innerHTML).not.toEqual(''); expect(document.querySelector('[data-name="main"]').innerHTML).not.toEqual('');
expect(document.querySelector('[data-name="test/hello-world"]').innerHTML).not.toEqual(''); expect(document.querySelector('[data-name="test/hello-world"]').innerHTML).not.toEqual('');
})); }));
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment