Commit dcae6796 authored by Mike Greiling's avatar Mike Greiling

Merge branch '327686-fe-specs' into 'master'

Update default branch name in FE specs

See merge request gitlab-org/gitlab!60820
parents cf9c0f54 d7fe24cb
...@@ -40,7 +40,7 @@ describe('AddContextCommitsModal', () => { ...@@ -40,7 +40,7 @@ describe('AddContextCommitsModal', () => {
store, store,
propsData: { propsData: {
contextCommitsPath: '', contextCommitsPath: '',
targetBranch: 'master', targetBranch: 'main',
mergeRequestIid: 1, mergeRequestIid: 1,
projectId: 1, projectId: 1,
...props, ...props,
......
...@@ -930,7 +930,7 @@ describe('Api', () => { ...@@ -930,7 +930,7 @@ describe('Api', () => {
describe('createBranch', () => { describe('createBranch', () => {
it('creates new branch', (done) => { it('creates new branch', (done) => {
const ref = 'master'; const ref = 'main';
const branch = 'new-branch-name'; const branch = 'new-branch-name';
const dummyProjectPath = 'gitlab-org/gitlab-ce'; const dummyProjectPath = 'gitlab-org/gitlab-ce';
const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${encodeURIComponent( const expectedUrl = `${dummyUrlRoot}/api/${dummyApiVersion}/projects/${encodeURIComponent(
...@@ -1262,7 +1262,7 @@ describe('Api', () => { ...@@ -1262,7 +1262,7 @@ describe('Api', () => {
)}/merge_requests`; )}/merge_requests`;
const options = { const options = {
source_branch: 'feature', source_branch: 'feature',
target_branch: 'master', target_branch: 'main',
title: 'Add feature', title: 'Add feature',
}; };
......
...@@ -16,7 +16,7 @@ function factory(initialState = {}) { ...@@ -16,7 +16,7 @@ function factory(initialState = {}) {
state: { state: {
...createState(), ...createState(),
...initialState, ...initialState,
definitionPathPrefix: 'https://test.com/blob/master', definitionPathPrefix: 'https://test.com/blob/main',
}, },
actions: { actions: {
fetchData, fetchData,
......
...@@ -12,11 +12,11 @@ describe('Code navigation mutations', () => { ...@@ -12,11 +12,11 @@ describe('Code navigation mutations', () => {
it('sets initial data', () => { it('sets initial data', () => {
mutations.SET_INITIAL_DATA(state, { mutations.SET_INITIAL_DATA(state, {
blobs: ['test'], blobs: ['test'],
definitionPathPrefix: 'https://test.com/blob/master', definitionPathPrefix: 'https://test.com/blob/main',
}); });
expect(state.blobs).toEqual(['test']); expect(state.blobs).toEqual(['test']);
expect(state.definitionPathPrefix).toBe('https://test.com/blob/master'); expect(state.definitionPathPrefix).toBe('https://test.com/blob/main');
}); });
}); });
......
...@@ -10,7 +10,7 @@ describe('Commits List', () => { ...@@ -10,7 +10,7 @@ describe('Commits List', () => {
beforeEach(() => { beforeEach(() => {
setFixtures(` setFixtures(`
<form class="commits-search-form" action="/h5bp/html5-boilerplate/commits/master"> <form class="commits-search-form" action="/h5bp/html5-boilerplate/commits/main">
<input id="commits-search"> <input id="commits-search">
</form> </form>
<ol id="commits-list"></ol> <ol id="commits-list"></ol>
...@@ -59,7 +59,7 @@ describe('Commits List', () => { ...@@ -59,7 +59,7 @@ describe('Commits List', () => {
jest.spyOn(window.history, 'replaceState').mockImplementation(() => {}); jest.spyOn(window.history, 'replaceState').mockImplementation(() => {});
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
mock.onGet('/h5bp/html5-boilerplate/commits/master').reply(200, { mock.onGet('/h5bp/html5-boilerplate/commits/main').reply(200, {
html: '<li>Result</li>', html: '<li>Result</li>',
}); });
......
...@@ -8,7 +8,7 @@ exports[`Contributors charts should render charts when loading completed and the ...@@ -8,7 +8,7 @@ exports[`Contributors charts should render charts when loading completed and the
<h4 <h4
class="gl-mb-2 gl-mt-5" class="gl-mb-2 gl-mt-5"
> >
Commits to master Commits to main
</h4> </h4>
<span> <span>
......
...@@ -10,7 +10,7 @@ let mock; ...@@ -10,7 +10,7 @@ let mock;
let store; let store;
const Component = Vue.extend(ContributorsCharts); const Component = Vue.extend(ContributorsCharts);
const endpoint = 'contributors'; const endpoint = 'contributors';
const branch = 'master'; const branch = 'main';
const chartData = [ const chartData = [
{ author_name: 'John', author_email: 'jawnnypoo@gmail.com', date: '2019-05-05' }, { author_name: 'John', author_email: 'jawnnypoo@gmail.com', date: '2019-05-05' },
{ author_name: 'John', author_email: 'jawnnypoo@gmail.com', date: '2019-03-03' }, { author_name: 'John', author_email: 'jawnnypoo@gmail.com', date: '2019-03-03' },
......
...@@ -3,7 +3,7 @@ export const diffMetadata = { ...@@ -3,7 +3,7 @@ export const diffMetadata = {
size: 1, size: 1,
branch_name: 'update-changelog', branch_name: 'update-changelog',
source_branch_exists: true, source_branch_exists: true,
target_branch_name: 'master', target_branch_name: 'main',
commit: null, commit: null,
context_commits: null, context_commits: null,
merge_request_diff: { merge_request_diff: {
......
...@@ -28,7 +28,7 @@ window.gl = window.gl || {}; ...@@ -28,7 +28,7 @@ window.gl = window.gl || {};
gl.utils = gl.utils || {}; gl.utils = gl.utils || {};
gl.utils.disableButtonIfEmptyField = () => {}; gl.utils.disableButtonIfEmptyField = () => {};
// the following test is unreliable and failing in master 2-3 times a day // the following test is unreliable and failing in main 2-3 times a day
// see https://gitlab.com/gitlab-org/gitlab/issues/206906#note_290602581 // see https://gitlab.com/gitlab-org/gitlab/issues/206906#note_290602581
// eslint-disable-next-line jest/no-disabled-tests // eslint-disable-next-line jest/no-disabled-tests
describe.skip('Old Notes (~/notes.js)', () => { describe.skip('Old Notes (~/notes.js)', () => {
......
...@@ -108,7 +108,7 @@ describe('Ref selector Vuex store mutations', () => { ...@@ -108,7 +108,7 @@ describe('Ref selector Vuex store mutations', () => {
const response = { const response = {
data: [ data: [
{ {
name: 'master', name: 'main',
default: true, default: true,
// everything except "name" and "default" should be stripped // everything except "name" and "default" should be stripped
...@@ -130,7 +130,7 @@ describe('Ref selector Vuex store mutations', () => { ...@@ -130,7 +130,7 @@ describe('Ref selector Vuex store mutations', () => {
expect(state.matches.branches).toEqual({ expect(state.matches.branches).toEqual({
list: [ list: [
{ {
name: 'master', name: 'main',
default: true, default: true,
}, },
{ {
......
...@@ -279,9 +279,7 @@ describe('Grouped test reports app', () => { ...@@ -279,9 +279,7 @@ describe('Grouped test reports app', () => {
}); });
it('renders the recent failures count on the test case', () => { it('renders the recent failures count on the test case', () => {
expect(findIssueRecentFailures().text()).toBe( expect(findIssueRecentFailures().text()).toBe('Failed 8 times in main in the last 14 days');
'Failed 8 times in master in the last 14 days',
);
}); });
}); });
......
...@@ -52,7 +52,7 @@ describe('Reports Store Mutations', () => { ...@@ -52,7 +52,7 @@ describe('Reports Store Mutations', () => {
system_output: "Failure/Error: is_expected.to eq('gitlab')", system_output: "Failure/Error: is_expected.to eq('gitlab')",
recent_failures: { recent_failures: {
count: 4, count: 4,
base_branch: 'master', base_branch: 'main',
}, },
}, },
], ],
......
...@@ -7,7 +7,7 @@ export const failedIssue = { ...@@ -7,7 +7,7 @@ export const failedIssue = {
"Failure/Error: is_expected.to eq(3)\n\n expected: 3\n got: -1\n\n (compared using ==)\n./spec/test_spec.rb:12:in `block (4 levels) in \u003ctop (required)\u003e'", "Failure/Error: is_expected.to eq(3)\n\n expected: 3\n got: -1\n\n (compared using ==)\n./spec/test_spec.rb:12:in `block (4 levels) in \u003ctop (required)\u003e'",
recent_failures: { recent_failures: {
count: 3, count: 3,
base_branch: 'master', base_branch: 'main',
}, },
}; };
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"system_output": "Failure/Error: is_expected.to eq(3)\n\n expected: 3\n got: -1\n\n (compared using ==)\n./spec/test_spec.rb:12:in `block (4 levels) in <top (required)>'", "system_output": "Failure/Error: is_expected.to eq(3)\n\n expected: 3\n got: -1\n\n (compared using ==)\n./spec/test_spec.rb:12:in `block (4 levels) in <top (required)>'",
"recent_failures": { "recent_failures": {
"count": 8, "count": 8,
"base_branch": "master" "base_branch": "main"
} }
}, },
{ {
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
"execution_time": 0.000562, "execution_time": 0.000562,
"recent_failures": { "recent_failures": {
"count": 3, "count": 3,
"base_branch": "master" "base_branch": "main"
} }
} }
], ],
......
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