a11yist/test/system/reports_test.rb
david 338447763f
All checks were successful
/ Run tests (push) Successful in 2m24s
/ Run system tests (push) Successful in 2m35s
/ Build, push and deploy image (push) Successful in 1m43s
fix/skip system tests
2024-09-11 22:43:26 +02:00

39 lines
1,000 B
Ruby

# frozen_string_literal: true
require "application_system_test_case"
class ReportsTest < ApplicationSystemTestCase
setup do
@report = reports(:one)
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_html
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_html
fill_in "Bezeichnung", with: @report.name
click_on "Prüfbericht aktualisieren"
end
test "should destroy Report" do
visit report_url(@report)
click_on "Prüfbericht löschen", match: :first
assert(Report.exists?(@report.id) == false)
end
end