a11yist/test/system/guidelines_test.rb
david 4dd445be57
Some checks failed
/ Run tests (push) Successful in 7m57s
/ Run system tests (push) Failing after 4m18s
/ Build, push and deploy image (push) Failing after 59s
wip: wcag structure
2025-05-16 19:02:33 +02:00

45 lines
1.2 KiB
Ruby

require "application_system_test_case"
class GuidelinesTest < ApplicationSystemTestCase
setup do
@guideline = guidelines(:one)
end
test "visiting the index" do
visit guidelines_url
assert_selector "h1", text: "Guidelines"
end
test "should create guideline" do
visit guidelines_url
click_on "New guideline"
fill_in "Name de", with: @guideline.name_de
fill_in "Number", with: @guideline.number
fill_in "Principle", with: @guideline.principle_id
click_on "Create Guideline"
assert_text "Guideline was successfully created"
click_on "Back"
end
test "should update Guideline" do
visit guideline_url(@guideline)
click_on "Edit this guideline", match: :first
fill_in "Name de", with: @guideline.name_de
fill_in "Number", with: @guideline.number
fill_in "Principle", with: @guideline.principle_id
click_on "Update Guideline"
assert_text "Guideline was successfully updated"
click_on "Back"
end
test "should destroy Guideline" do
visit guideline_url(@guideline)
click_on "Destroy this guideline", match: :first
assert_text "Guideline was successfully destroyed"
end
end