Basic feature implemented, very basic poc
This commit is contained in:
parent
216089a3e7
commit
48c0067076
118 changed files with 2113 additions and 20 deletions
51
test/system/success_criteria_test.rb
Normal file
51
test/system/success_criteria_test.rb
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
require "application_system_test_case"
|
||||
|
||||
class SuccessCriteriaTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@success_criterion = success_criteria(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit success_criteria_url
|
||||
assert_selector "h1", text: "Success criteria"
|
||||
end
|
||||
|
||||
test "should create success criterion" do
|
||||
visit success_criteria_url
|
||||
click_on "New success criterion"
|
||||
|
||||
fill_in "Comment", with: @success_criterion.comment
|
||||
fill_in "Description", with: @success_criterion.description
|
||||
fill_in "Element", with: @success_criterion.element_id
|
||||
fill_in "Level", with: @success_criterion.level
|
||||
fill_in "Result", with: @success_criterion.result
|
||||
fill_in "Title", with: @success_criterion.title
|
||||
click_on "Create Success criterion"
|
||||
|
||||
assert_text "Success criterion was successfully created"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should update Success criterion" do
|
||||
visit success_criterion_url(@success_criterion)
|
||||
click_on "Edit this success criterion", match: :first
|
||||
|
||||
fill_in "Comment", with: @success_criterion.comment
|
||||
fill_in "Description", with: @success_criterion.description
|
||||
fill_in "Element", with: @success_criterion.element_id
|
||||
fill_in "Level", with: @success_criterion.level
|
||||
fill_in "Result", with: @success_criterion.result
|
||||
fill_in "Title", with: @success_criterion.title
|
||||
click_on "Update Success criterion"
|
||||
|
||||
assert_text "Success criterion was successfully updated"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should destroy Success criterion" do
|
||||
visit success_criterion_url(@success_criterion)
|
||||
click_on "Destroy this success criterion", match: :first
|
||||
|
||||
assert_text "Success criterion was successfully destroyed"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue