scinote-web/features/step_definitions/result_steps.rb

28 lines
772 B
Ruby
Raw Normal View History

Given(/^I'm on the Results page of a "([^"]*)" task$/) do |task_name|
task = MyModule.find_by_name(task_name)
visit results_my_module_path(task)
end
Given(/^I click edit "(.+)" result icon$/) do |result_name|
find('.panel-heading', text: result_name).find('.edit-result-asset').click
end
2019-12-17 18:21:49 +08:00
Then("I input {string} in cell") do |input|
find('.handsontableInput').set(input)
end
Then("I click on table cell one") do
find('.htCore tbody td', match: :first).double_click
end
Given("I am on Task archive page") do
visit "/modules/1/archive"
end
Then("I change comment {string} with {string} of {string}") do |text1, text2, message_id|
find("#{message_id}", text: text1).set(text2)
end
Given("I am on Task results page") do
visit "/modules/1/results"
end