Fix rspec error text regex

This commit is contained in:
Matija Čupić 2018-10-24 20:57:50 +02:00
parent 4196583cf9
commit 1a92af2868
No known key found for this signature in database
GPG key ID: 4BAF84FFACD2E5DE
3 changed files with 5 additions and 4 deletions

View file

@ -18,7 +18,8 @@ export default class MergeRequestStore {
this.squash = data.squash;
this.squashBeforeMergeHelpPath =
this.squashBeforeMergeHelpPath || data.squash_before_merge_help_path;
this.troubleshootingDocsPath = data.troubleshooting_docs_path;
this.troubleshootingDocsPath =
this.troubleshootingDocsPath || data.troubleshooting_docs_path;
this.enableSquashBeforeMerge = this.enableSquashBeforeMerge || true;
this.iid = data.iid;

View file

@ -174,7 +174,7 @@ describe 'Merge request > User sees merge widget', :js do
# Wait for the `ci_status` and `merge_check` requests
wait_for_requests
expect(page).to have_text('Could not retrieve the pipeline status. For troubleshooting steps, read the <a href=\"\">documentation.</a>')
expect(page).to have_text(%r{Could not retrieve the pipeline status\. For troubleshooting steps, read the <a href=\".+\">documentation\.</a>})
end
end

View file

@ -41,8 +41,8 @@ describe 'Merge request > User sees pipelines', :js do
visit project_merge_request_path(project, merge_request)
wait_for_requests
expect(page.find('.ci-widget')).to have_content(
'Could not retrieve the pipeline status. For potential solutions please read the documentation.')
expect(page.find('.ci-widget')).to have_text(
%r{Could not retrieve the pipeline status\. For troubleshooting steps, read the <a href=\".+\">documentation\.</a>})
end
end