a11yist/test/system/reports_test.rb
david aa1552db81
Some checks failed
/ Run tests (push) Successful in 2m13s
/ Run system tests (push) Failing after 2m16s
/ Build, push and deploy image (push) Successful in 2m7s
Fix test
2024-11-17 00:50:39 +01:00

46 lines
1.1 KiB
Ruby

# frozen_string_literal: true
require "application_system_test_case"
class ReportsTest < ApplicationSystemTestCase
setup do
@report = reports(:one)
login_test
end
teardown do
logout
end
test "visiting the index" do
visit reports_url
assert_selector "h1", text: "Prüfberichte"
end
test "should create report" do
visit reports_url
click_on "Prüfbericht hinzufügen"
fill_in_rich_text_area "Projektbeschreibung", with: @report.comment
fill_in "Bezeichnung", with: @report.name
click_on "Prüfbericht erstellen"
end
test "should update Report" do
visit report_url(@report)
click_on "Prüfbericht bearbeiten", match: :first
fill_in_rich_text_area "Projektbeschreibung", with: @report.comment
fill_in "Bezeichnung", with: @report.name
click_on "Prüfbericht aktualisieren"
end
test "should destroy Report" do
visit report_url(@report)
accept_confirm do
click_on "Prüfbericht löschen", match: :first
end
assert_text("Prüfberichte")
assert(Report.exists?(@report.id) == false)
end
end