very basic system tests
All checks were successful
/ Text (push) Successful in 1m4s
/ Checkout (push) Successful in 1m11s

This commit is contained in:
david 2024-07-23 01:06:45 +02:00
parent 345a932514
commit c31d4266cd
12 changed files with 114 additions and 185 deletions

View file

@ -1,45 +1,35 @@
require "application_system_test_case"
require 'application_system_test_case'
class ChecklistsTest < ApplicationSystemTestCase
setup do
@checklist = checklists(:one)
end
test "visiting the index" do
test 'visiting the index' do
visit checklists_url
assert_selector "h1", text: "Checklists"
assert_selector 'h1', text: 'Checklisten'
end
test "should create checklist" do
test 'should create checklist' do
visit checklists_url
click_on "New checklist"
click_on 'Checkliste hinzufügen'
fill_in "Code", with: @checklist.code
fill_in "Description", with: @checklist.description
fill_in "Name", with: @checklist.name
click_on "Create Checklist"
assert_text "Checklist was successfully created"
click_on "Back"
fill_in_rich_text_area 'Details', with: @checklist.description
fill_in 'Überschrift', with: @checklist.name
click_on 'Checkliste erstellen'
end
test "should update Checklist" do
test 'should update Checkliste' do
visit checklist_url(@checklist)
click_on "Edit this checklist", match: :first
click_on 'Checkliste bearbeiten', match: :first
fill_in "Code", with: @checklist.code
fill_in "Description", with: @checklist.description
fill_in "Name", with: @checklist.name
click_on "Update Checklist"
assert_text "Checklist was successfully updated"
click_on "Back"
fill_in_rich_text_area 'Details', with: @checklist.description
fill_in 'Überschrift', with: @checklist.name
click_on 'Checkliste aktualisieren'
end
test "should destroy Checklist" do
test 'should destroy Checkliste' do
visit checklist_url(@checklist)
click_on "Destroy this checklist", match: :first
assert_text "Checklist was successfully destroyed"
click_on 'Checkliste löschen', match: :first
end
end