Refactorings and gui improvements
Some checks failed
/ Run tests (push) Successful in 1m22s
/ Run system tests (push) Failing after 1m33s
/ Build, push and deploy image (push) Successful in 3m22s

This commit is contained in:
david 2024-11-03 21:58:25 +01:00
parent c965e03e5a
commit d1294c2fc4
46 changed files with 358 additions and 128020 deletions

View file

@ -3,45 +3,43 @@ require "application_system_test_case"
class PagesTest < ApplicationSystemTestCase
setup do
@page = pages(:one)
login_test
end
teardown do
logout
end
test "visiting the index" do
visit pages_url
assert_selector "h1", text: "Pages"
visit report_pages_url(@page.report)
assert_selector "h1", text: "Pfade"
end
test "should create page" do
visit pages_url
click_on "New page"
visit report_pages_url(@page.report)
click_on "Pfad hinzufügen"
fill_in "Path", with: @page.path
fill_in "Position", with: @page.position
fill_in "Report", with: @page.report_id
fill_in "Name", with: @page.path
fill_in "Url", with: @page.url
click_on "Create Page"
click_on "Pfad erstellen"
assert_text "Page was successfully created"
click_on "Back"
assert_text "Prüfbericht bearbeiten"
end
test "should update Page" do
visit page_url(@page)
click_on "Edit this page", match: :first
click_on "Pfad bearbeiten", match: :first
fill_in "Path", with: @page.path
fill_in "Position", with: @page.position
fill_in "Report", with: @page.report_id
fill_in "Name", with: @page.path
fill_in "Url", with: @page.url
click_on "Update Page"
assert_text "Page was successfully updated"
click_on "Back"
click_on "Pfad aktualisieren"
end
test "should destroy Page" do
visit page_url(@page)
click_on "Destroy this page", match: :first
click_on "Pfad löschen", match: :first
assert_text "Page was successfully destroyed"
assert_text "Pfad hinzufügen"
assert(Page.exists?(@page.id) == false)
end
end