Suppress warning about missing `.gitlab-ci.yml` if builds are disabled
When user disables GitLab Ci Service in project's settings then warning about missing `.gitlab-ci.yml` file should be supressed. This a matter of user experience as stated in #3761 (closes #3761).
This commit is contained in:
parent
c80f34257d
commit
00155b6c69
|
@ -60,15 +60,29 @@ describe "Commits" do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe ".gitlab-ci.yml not found warning" do
|
describe ".gitlab-ci.yml not found warning" do
|
||||||
it "does not show warning" do
|
context 'ci service enabled' do
|
||||||
visit ci_status_path(@commit)
|
it "does not show warning" do
|
||||||
expect(page).not_to have_content ".gitlab-ci.yml not found in this commit"
|
visit ci_status_path(@commit)
|
||||||
|
expect(page).not_to have_content ".gitlab-ci.yml not found in this commit"
|
||||||
|
end
|
||||||
|
|
||||||
|
it "shows warning" do
|
||||||
|
stub_ci_commit_yaml_file(nil)
|
||||||
|
visit ci_status_path(@commit)
|
||||||
|
expect(page).to have_content ".gitlab-ci.yml not found in this commit"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "shows warning" do
|
context 'ci service disabled' do
|
||||||
stub_ci_commit_yaml_file(nil)
|
before do
|
||||||
visit ci_status_path(@commit)
|
allow_any_instance_of(GitlabCiService).to receive(:active).and_return(false)
|
||||||
expect(page).to have_content ".gitlab-ci.yml not found in this commit"
|
stub_ci_commit_yaml_file(nil)
|
||||||
|
visit ci_status_path(@commit)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does not show warning' do
|
||||||
|
expect(page).not_to have_content '.gitlab-ci.yml not found in this commit'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue