start of iteration 2
Some checks failed
/ Run tests (push) Failing after 1m19s
/ Run system tests (push) Failing after 1m18s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-10-31 23:13:18 +01:00
parent 9fb87a74ce
commit 729ed13521
75 changed files with 705 additions and 170 deletions

47
test/system/pages_test.rb Normal file
View file

@ -0,0 +1,47 @@
require "application_system_test_case"
class PagesTest < ApplicationSystemTestCase
setup do
@page = pages(:one)
end
test "visiting the index" do
visit pages_url
assert_selector "h1", text: "Pages"
end
test "should create page" do
visit pages_url
click_on "New page"
fill_in "Path", with: @page.path
fill_in "Position", with: @page.position
fill_in "Report", with: @page.report_id
fill_in "Url", with: @page.url
click_on "Create Page"
assert_text "Page was successfully created"
click_on "Back"
end
test "should update Page" do
visit page_url(@page)
click_on "Edit this page", match: :first
fill_in "Path", with: @page.path
fill_in "Position", with: @page.position
fill_in "Report", with: @page.report_id
fill_in "Url", with: @page.url
click_on "Update Page"
assert_text "Page was successfully updated"
click_on "Back"
end
test "should destroy Page" do
visit page_url(@page)
click_on "Destroy this page", match: :first
assert_text "Page was successfully destroyed"
end
end