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