diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-08 07:51:07 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-08 07:51:07 +0000 |
commit | 94611607e56f0e0f0b05682481db79ff99e9e34e (patch) | |
tree | d2efea4ac3a6ec9aa3feabeb5c2187cfdd91d8f6 /spec/features/projects | |
parent | 720968cc8799f665f4f4392e80bf8dfe88fdd69b (diff) | |
parent | 28ca8502c254d5c3edfb7ece36fc365e7a715df0 (diff) | |
download | gitlab-ce-94611607e56f0e0f0b05682481db79ff99e9e34e.tar.gz |
Merge remote-tracking branch 'upstream/master' into pipeline-emails
* upstream/master: (292 commits)
Deletes extra empty line breaking the build
Optimize the `award_user_list` helper spec
Fix typo and add he MWBS accronym for "Merge When Build Succeeds"
Added missing content and improved layout
ExpireBuildArtifactsWorker query builds table without ordering enqueuing one job per build to cleanup
Improve the contribution and MR review guide
Updates test in order to look for link
Make projects API docs match parameter style
Fix Event#reset_project_activity updates
Update user whitelist reject message
Call ensure_secret_token! in secret token test's before block since it would be called in an initializer.
Add a CHANGELOG for CacheMarkdownField
Enable CacheMarkdownField for the remaining models
Make search results use the markdown cache columns, treating them consistently
Use CacheMarkdownField for notes
Add markdown cache columns to the database, but don't use them yet
Update issue board spec
Link to Registry docs from project settings
Truncate long labels with ellipsis in labels page
Improve issue load time performance by avoiding ORDER BY in find_by call
...
Diffstat (limited to 'spec/features/projects')
-rw-r--r-- | spec/features/projects/badges/coverage_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/import_export/export_file_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/issuable_templates_spec.rb | 30 |
3 files changed, 28 insertions, 6 deletions
diff --git a/spec/features/projects/badges/coverage_spec.rb b/spec/features/projects/badges/coverage_spec.rb index 5972e7f31c2..01a95bf49ac 100644 --- a/spec/features/projects/badges/coverage_spec.rb +++ b/spec/features/projects/badges/coverage_spec.rb @@ -59,7 +59,7 @@ feature 'test coverage badge' do create(:ci_pipeline, opts).tap do |pipeline| yield pipeline - pipeline.build_updated + pipeline.update_status end end diff --git a/spec/features/projects/import_export/export_file_spec.rb b/spec/features/projects/import_export/export_file_spec.rb index 27c986c5187..52d08982c7a 100644 --- a/spec/features/projects/import_export/export_file_spec.rb +++ b/spec/features/projects/import_export/export_file_spec.rb @@ -47,6 +47,8 @@ feature 'Import/Export - project export integration test', feature: true, js: tr expect(page).to have_content('Download export') + expect(file_permissions(project.export_path)).to eq(0700) + in_directory_with_expanded_export(project) do |exit_status, tmpdir| expect(exit_status).to eq(0) diff --git a/spec/features/projects/issuable_templates_spec.rb b/spec/features/projects/issuable_templates_spec.rb index f76c4fe8b57..cd79c4f512d 100644 --- a/spec/features/projects/issuable_templates_spec.rb +++ b/spec/features/projects/issuable_templates_spec.rb @@ -26,7 +26,7 @@ feature 'issuable templates', feature: true, js: true do scenario 'user selects "bug" template' do select_template 'bug' wait_for_ajax - preview_template + preview_template(template_content) save_changes end @@ -42,6 +42,26 @@ feature 'issuable templates', feature: true, js: true do end end + context 'user creates an issue using templates, with a prior description' do + let(:prior_description) { 'test issue description' } + let(:template_content) { 'this is a test "bug" template' } + let(:issue) { create(:issue, author: user, assignee: user, project: project) } + + background do + project.repository.commit_file(user, '.gitlab/issue_templates/bug.md', template_content, 'added issue template', 'master', false) + visit edit_namespace_project_issue_path project.namespace, project, issue + fill_in :'issue[title]', with: 'test issue title' + fill_in :'issue[description]', with: prior_description + end + + scenario 'user selects "bug" template' do + select_template 'bug' + wait_for_ajax + preview_template("#{prior_description}\n\n#{template_content}") + save_changes + end + end + context 'user creates a merge request using templates' do let(:template_content) { 'this is a test "feature-proposal" template' } let(:merge_request) { create(:merge_request, :with_diffs, source_project: project) } @@ -55,7 +75,7 @@ feature 'issuable templates', feature: true, js: true do scenario 'user selects "feature-proposal" template' do select_template 'feature-proposal' wait_for_ajax - preview_template + preview_template(template_content) save_changes end end @@ -82,16 +102,16 @@ feature 'issuable templates', feature: true, js: true do scenario 'user selects template' do select_template 'feature-proposal' wait_for_ajax - preview_template + preview_template(template_content) save_changes end end end end - def preview_template + def preview_template(expected_content) click_link 'Preview' - expect(page).to have_content template_content + expect(page).to have_content expected_content end def save_changes |