a11yist/test/system/pages_test.rb
david d1294c2fc4
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
Refactorings and gui improvements
2024-11-03 21:58:25 +01:00

45 lines
958 B
Ruby

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 report_pages_url(@page.report)
assert_selector "h1", text: "Pfade"
end
test "should create page" do
visit report_pages_url(@page.report)
click_on "Pfad hinzufügen"
fill_in "Name", with: @page.path
fill_in "Url", with: @page.url
click_on "Pfad erstellen"
assert_text "Prüfbericht bearbeiten"
end
test "should update Page" do
visit page_url(@page)
click_on "Pfad bearbeiten", match: :first
fill_in "Name", with: @page.path
fill_in "Url", with: @page.url
click_on "Pfad aktualisieren"
end
test "should destroy Page" do
visit page_url(@page)
click_on "Pfad löschen", match: :first
assert_text "Pfad hinzufügen"
assert(Page.exists?(@page.id) == false)
end
end