Basic feature implemented, very basic poc
This commit is contained in:
parent
216089a3e7
commit
48c0067076
118 changed files with 2113 additions and 20 deletions
47
test/system/elements_test.rb
Normal file
47
test/system/elements_test.rb
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
require "application_system_test_case"
|
||||
|
||||
class ElementsTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@element = elements(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit elements_url
|
||||
assert_selector "h1", text: "Elements"
|
||||
end
|
||||
|
||||
test "should create element" do
|
||||
visit elements_url
|
||||
click_on "New element"
|
||||
|
||||
fill_in "Description", with: @element.description
|
||||
fill_in "Path", with: @element.path
|
||||
fill_in "Report", with: @element.report_id
|
||||
fill_in "Title", with: @element.title
|
||||
click_on "Create Element"
|
||||
|
||||
assert_text "Element was successfully created"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should update Element" do
|
||||
visit element_url(@element)
|
||||
click_on "Edit this element", match: :first
|
||||
|
||||
fill_in "Description", with: @element.description
|
||||
fill_in "Path", with: @element.path
|
||||
fill_in "Report", with: @element.report_id
|
||||
fill_in "Title", with: @element.title
|
||||
click_on "Update Element"
|
||||
|
||||
assert_text "Element was successfully updated"
|
||||
click_on "Back"
|
||||
end
|
||||
|
||||
test "should destroy Element" do
|
||||
visit element_url(@element)
|
||||
click_on "Destroy this element", match: :first
|
||||
|
||||
assert_text "Element was successfully destroyed"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue