Commit b8bfeb3b authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'wait-for-requests-in-comments-on-commits-spec' into 'master'

Add waiting for requests in discussion_comments_shared_example.rb and variable_list_shared_examples.rb

See merge request gitlab-org/gitlab!63067
parents b2151a31 9bf74429
......@@ -11,6 +11,8 @@ RSpec.shared_examples 'thread comments for commit and snippet' do |resource_name
let(:comment) { 'My comment' }
it 'clicking "Comment" will post a comment' do
wait_for_all_requests
expect(page).to have_selector toggle_selector
find("#{form_selector} .note-textarea").send_keys(comment)
......@@ -29,6 +31,8 @@ RSpec.shared_examples 'thread comments for commit and snippet' do |resource_name
find("#{form_selector} .note-textarea").send_keys(comment)
find(toggle_selector).click
wait_for_all_requests
end
it 'has a "Comment" item (selected by default) and "Start thread" item' do
......
......@@ -283,6 +283,8 @@ RSpec.shared_examples 'variable list' do
end
def fill_variable(key, value, protected: false, masked: false)
wait_for_requests
page.within('#add-ci-variable') do
find('[data-qa-selector="ci_variable_key_field"] input').set(key)
find('[data-qa-selector="ci_variable_value_field"]').set(value) if value.present?
......
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