Skip to content
Snippets Groups Projects
Commit dea6ebd3 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 94611567
No related branches found
No related tags found
No related merge requests found
Showing
with 48 additions and 62 deletions
# frozen_string_literal: true
require 'spec_helper'
 
describe TimeHelper do
Loading
Loading
# frozen_string_literal: true
require "spec_helper"
 
describe TodosHelper do
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe TreeHelper do
Loading
Loading
# frozen_string_literal: true
require "spec_helper"
 
describe UserCalloutsHelper do
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe UsersHelper do
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe VersionCheckHelper do
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe VisibilityLevelHelper do
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe WikiHelper do
Loading
Loading
Loading
Loading
@@ -473,18 +473,16 @@ describe('IDE commit module actions', () => {
});
 
it('resets changed files before redirecting', done => {
visitUrl = visitUrl.and.callFake(() => {
expect(store.state.stagedFiles.length).toBe(0);
done();
});
spyOn(eventHub, '$on');
 
store.state.commit.commitAction = '3';
 
store
.dispatch('commit/commitChanges')
.then(() => {
expect(store.state.stagedFiles.length).toBe(0);
done();
})
.catch(done.fail);
store.dispatch('commit/commitChanges').catch(done.fail);
});
});
});
Loading
Loading
Loading
Loading
@@ -60,6 +60,18 @@ describe('Time series component', () => {
expect(timeSeriesChart.find('.js-graph-widgets').text()).toBe(mockWidgets);
});
 
it('allows user to override max value label text using prop', () => {
timeSeriesChart.setProps({ legendMaxText: 'legendMaxText' });
expect(timeSeriesChart.props().legendMaxText).toBe('legendMaxText');
});
it('allows user to override average value label text using prop', () => {
timeSeriesChart.setProps({ legendAverageText: 'averageText' });
expect(timeSeriesChart.props().legendAverageText).toBe('averageText');
});
describe('methods', () => {
describe('formatTooltipText', () => {
const mockDate = deploymentData[0].created_at;
Loading
Loading
Loading
Loading
@@ -250,7 +250,6 @@ project:
- cluster
- clusters
- cluster_project
- cluster_ingresses
- creator
- cycle_analytics_stages
- group
Loading
Loading
Loading
Loading
@@ -38,12 +38,6 @@ describe Issues::ZoomLinkService do
end
end
 
shared_context 'feature flag disabled' do
before do
stub_feature_flags(issue_zoom_integration: false)
end
end
shared_context 'insufficient permissions' do
before do
project.add_guest(user)
Loading
Loading
@@ -78,11 +72,6 @@ describe Issues::ZoomLinkService do
include_examples 'cannot add link'
end
 
context 'when feature flag is disabled' do
include_context 'feature flag disabled'
include_examples 'cannot add link'
end
context 'with insufficient permissions' do
include_context 'insufficient permissions'
include_examples 'cannot add link'
Loading
Loading
@@ -113,12 +102,6 @@ describe Issues::ZoomLinkService do
 
it { is_expected.to eq(true) }
 
context 'when feature flag is disabled' do
include_context 'feature flag disabled'
it { is_expected.to eq(false) }
end
context 'with insufficient permissions' do
include_context 'insufficient permissions'
 
Loading
Loading
@@ -152,11 +135,6 @@ describe Issues::ZoomLinkService do
.to eq(issue.description.delete_suffix("\n\n#{zoom_link}"))
end
 
context 'when feature flag is disabled' do
include_context 'feature flag disabled'
include_examples 'cannot remove link'
end
context 'with insufficient permissions' do
include_context 'insufficient permissions'
include_examples 'cannot remove link'
Loading
Loading
@@ -187,12 +165,6 @@ describe Issues::ZoomLinkService do
 
it { is_expected.to eq(true) }
 
context 'when feature flag is disabled' do
include_context 'feature flag disabled'
it { is_expected.to eq(false) }
end
context 'with insufficient permissions' do
include_context 'insufficient permissions'
 
Loading
Loading
Loading
Loading
@@ -50,6 +50,7 @@ describe Projects::ForkService do
it { expect(to_project.star_count).to be_zero }
it { expect(to_project.description).to eq(@from_project.description) }
it { expect(to_project.avatar.file).to be_exists }
it { expect(to_project.ci_config_path).to eq(@from_project.ci_config_path) }
 
# This test is here because we had a bug where the from-project lost its
# avatar after being forked.
Loading
Loading
@@ -215,7 +216,8 @@ describe Projects::ForkService do
@project = create(:project, :repository,
creator_id: @group_owner.id,
star_count: 777,
description: 'Wow, such a cool project!')
description: 'Wow, such a cool project!',
ci_config_path: 'debian/salsa-ci.yml')
@group = create(:group)
@group.add_user(@group_owner, GroupMember::OWNER)
@group.add_user(@developer, GroupMember::DEVELOPER)
Loading
Loading
@@ -228,14 +230,15 @@ describe Projects::ForkService do
it 'group owner successfully forks project into the group' do
to_project = fork_project(@project, @group_owner, @opts)
 
expect(to_project).to be_persisted
expect(to_project.errors).to be_empty
expect(to_project.owner).to eq(@group)
expect(to_project.namespace).to eq(@group)
expect(to_project.name).to eq(@project.name)
expect(to_project.path).to eq(@project.path)
expect(to_project.description).to eq(@project.description)
expect(to_project.star_count).to be_zero
expect(to_project).to be_persisted
expect(to_project.errors).to be_empty
expect(to_project.owner).to eq(@group)
expect(to_project.namespace).to eq(@group)
expect(to_project.name).to eq(@project.name)
expect(to_project.path).to eq(@project.path)
expect(to_project.description).to eq(@project.description)
expect(to_project.ci_config_path).to eq(@project.ci_config_path)
expect(to_project.star_count).to be_zero
end
end
 
Loading
Loading
Loading
Loading
@@ -373,6 +373,8 @@ module GpgHelpers
KEY
end
 
# passphrase for secret key is:
# 4a45718624c9939a043471d83d1eda7c
def secret_key
<<~SECRET
-----BEGIN PGP PRIVATE KEY BLOCK-----
Loading
Loading
Loading
Loading
@@ -45,14 +45,6 @@ shared_examples 'zoom quick actions' do
expect(page).to have_content('Failed to add a Zoom meeting')
expect(page).not_to have_content(zoom_link)
end
context 'when feature flag disabled' do
before do
stub_feature_flags(issue_zoom_integration: false)
end
include_examples 'skip silently'
end
end
 
context 'with Zoom link not at the end of the issue description' do
Loading
Loading
@@ -92,14 +84,6 @@ shared_examples 'zoom quick actions' do
expect(page).to have_content('Zoom meeting removed')
expect(issue.reload.description).to eq("Text with #{zoom_link}")
end
context 'when feature flag disabled' do
before do
stub_feature_flags(issue_zoom_integration: false)
end
include_examples 'skip silently'
end
end
 
context 'with a Zoom link not at the end of the description' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment