Commit 17da29e4 authored by Jacques Erasmus's avatar Jacques Erasmus

Update master to main

Updated the default branch name
parent 0c171090
......@@ -55,8 +55,8 @@ describe('Repository table component', () => {
it.each`
path | ref
${'/'} | ${'master'}
${'app/assets'} | ${'master'}
${'/'} | ${'main'}
${'app/assets'} | ${'main'}
${'/'} | ${'test'}
`('renders table caption for $ref in $path', ({ path, ref }) => {
factory({ path });
......
......@@ -12,7 +12,7 @@ function factory(path, loadingPath) {
vm = shallowMount(ParentRow, {
propsData: {
commitRef: 'master',
commitRef: 'main',
path,
loadingPath,
},
......@@ -32,10 +32,10 @@ describe('Repository parent row component', () => {
it.each`
path | to
${'app'} | ${'/-/tree/master/'}
${'app/assets'} | ${'/-/tree/master/app'}
${'app/assets#/test'} | ${'/-/tree/master/app/assets%23'}
${'app/assets#/test/world'} | ${'/-/tree/master/app/assets%23/test'}
${'app'} | ${'/-/tree/main/'}
${'app/assets'} | ${'/-/tree/main/app'}
${'app/assets#/test'} | ${'/-/tree/main/app/assets%23'}
${'app/assets#/test/world'} | ${'/-/tree/main/app/assets%23/test'}
`('renders link in $path to $to', ({ path, to }) => {
factory(path);
......@@ -50,7 +50,7 @@ describe('Repository parent row component', () => {
vm.find('td').trigger('click');
expect($router.push).toHaveBeenCalledWith({
path: '/-/tree/master/app',
path: '/-/tree/main/app',
});
});
......@@ -62,7 +62,7 @@ describe('Repository parent row component', () => {
vm.find('a').trigger('click');
expect($router.push).not.toHaveBeenCalledWith({
path: '/-/tree/master/app',
path: '/-/tree/main/app',
});
});
......
......@@ -30,7 +30,7 @@ function factory(propsData = {}) {
},
});
vm.setData({ escapedRef: 'master' });
vm.setData({ escapedRef: 'main' });
}
describe('Repository table row component', () => {
......@@ -115,7 +115,7 @@ describe('Repository table row component', () => {
return vm.vm.$nextTick().then(() => {
expect(vm.find({ ref: 'link' }).props('to')).toEqual({
path: `/-/tree/master/${encodeURIComponent(path)}`,
path: `/-/tree/main/${encodeURIComponent(path)}`,
});
});
});
......@@ -130,7 +130,7 @@ describe('Repository table row component', () => {
});
return vm.vm.$nextTick().then(() => {
expect(vm.find('.tree-item-link').props('to')).toEqual({ path: '/-/tree/master/test%23' });
expect(vm.find('.tree-item-link').props('to')).toEqual({ path: '/-/tree/main/test%23' });
});
});
......
......@@ -20,8 +20,8 @@ jest.mock('~/lib/utils/url_utility', () => ({
const initialProps = {
modalId: 'upload-blob',
commitMessage: 'Upload New File',
targetBranch: 'master',
originalBranch: 'master',
targetBranch: 'main',
originalBranch: 'main',
canPushCode: true,
path: 'new_upload',
};
......@@ -111,7 +111,7 @@ describe('UploadBlobModal', () => {
if (canPushCode) {
describe('when changing the branch name', () => {
it('displays the MR toggle', async () => {
wrapper.setData({ target: 'Not master' });
wrapper.setData({ target: 'Not main' });
await wrapper.vm.$nextTick();
......
......@@ -53,7 +53,7 @@ describe('fetchLogsTree', () => {
client = {
readQuery: () => ({
projectPath: 'gitlab-org/gitlab-foss',
escapedRef: 'master',
escapedRef: 'main',
commits: [],
}),
writeQuery: jest.fn(),
......@@ -71,7 +71,7 @@ describe('fetchLogsTree', () => {
it('calls axios get', () =>
fetchLogsTree(client, '', '0', resolver).then(() => {
expect(axios.get).toHaveBeenCalledWith('/gitlab-org/gitlab-foss/-/refs/master/logs_tree/', {
expect(axios.get).toHaveBeenCalledWith('/gitlab-org/gitlab-foss/-/refs/main/logs_tree/', {
params: { format: 'json', offset: '0' },
});
}));
......@@ -114,7 +114,7 @@ describe('fetchLogsTree', () => {
query: expect.anything(),
data: {
projectPath: 'gitlab-org/gitlab-foss',
escapedRef: 'master',
escapedRef: 'main',
commits: [
expect.objectContaining({
__typename: 'LogTreeCommit',
......
......@@ -6,13 +6,13 @@ import createRouter from '~/repository/router';
describe('Repository router spec', () => {
it.each`
path | branch | component | componentName
${'/'} | ${'master'} | ${IndexPage} | ${'IndexPage'}
${'/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'}
${'/'} | ${'main'} | ${IndexPage} | ${'IndexPage'}
${'/tree/main'} | ${'main'} | ${TreePage} | ${'TreePage'}
${'/tree/feat(test)'} | ${'feat(test)'} | ${TreePage} | ${'TreePage'}
${'/-/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'}
${'/-/tree/master/app/assets'} | ${'master'} | ${TreePage} | ${'TreePage'}
${'/-/tree/123/app/assets'} | ${'master'} | ${null} | ${'null'}
${'/-/blob/master/file.md'} | ${'master'} | ${BlobPage} | ${'BlobPage'}
${'/-/tree/main'} | ${'main'} | ${TreePage} | ${'TreePage'}
${'/-/tree/main/app/assets'} | ${'main'} | ${TreePage} | ${'TreePage'}
${'/-/tree/123/app/assets'} | ${'main'} | ${null} | ${'null'}
${'/-/blob/main/file.md'} | ${'main'} | ${BlobPage} | ${'BlobPage'}
`('sets component as $componentName for path "$path"', ({ path, component, branch }) => {
const router = createRouter('', branch);
......
......@@ -8,9 +8,9 @@ describe('setTitle', () => {
${'app/assets'} | ${'app/assets'}
${'app/assets/javascripts'} | ${'app/assets/javascripts'}
`('sets document title as $title for $path', ({ path, title }) => {
setTitle(path, 'master', 'GitLab Org / GitLab');
setTitle(path, 'main', 'GitLab Org / GitLab');
expect(document.title).toEqual(`${title} · master · GitLab Org / GitLab · GitLab`);
expect(document.title).toEqual(`${title} · main · GitLab Org / GitLab · GitLab`);
});
});
......
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