scinote-web/features/step_definitions/protocol_steps.rb

23 lines
649 B
Ruby
Raw Normal View History

2019-12-17 18:36:19 +08:00
# frozen_string_literal: true
Then(/^I should see "([^"]*)" attachment on "([^"]*)" step$/) do |file, step_name|
wait_for_ajax
expect(find('.step', text: step_name)).to have_content(file)
end
2020-05-15 17:04:17 +08:00
Then(/^I'm opening protocol section$/) do
find(:css, '.task-section-caret[aria-controls="protocol-container"]').click
end
2019-12-17 18:21:49 +08:00
Then("I select {string} color") do |color1|
find("[data-color='#{color1}']").click
end
2019-12-17 18:36:19 +08:00
Then('I click on Edit sign of {string} tag') do |text1|
2019-12-17 18:21:49 +08:00
page.find("[data-name='#{text1}']").find('.edit-tag-link').click
end
2019-12-17 18:36:19 +08:00
Given('I click on {string} tag button') do |button2|
2019-12-17 18:21:49 +08:00
find('.btn', text: button2, match: :first).click
end