very basic system tests
This commit is contained in:
parent
345a932514
commit
c31d4266cd
12 changed files with 114 additions and 185 deletions
|
|
@ -1,43 +1,35 @@
|
|||
require "application_system_test_case"
|
||||
require 'application_system_test_case'
|
||||
|
||||
class ReportsTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@report = reports(:one)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
test 'visiting the index' do
|
||||
visit reports_url
|
||||
assert_selector "h1", text: "Reports"
|
||||
assert_selector 'h1', text: 'Prüfberichte'
|
||||
end
|
||||
|
||||
test "should create report" do
|
||||
test 'should create report' do
|
||||
visit reports_url
|
||||
click_on "New report"
|
||||
click_on 'Prüfbericht hinzufügen'
|
||||
|
||||
fill_in "Comment", with: @report.comment
|
||||
fill_in "Name", with: @report.name
|
||||
click_on "Create Report"
|
||||
|
||||
assert_text "Report was successfully created"
|
||||
click_on "Back"
|
||||
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
|
||||
test 'should update Report' do
|
||||
visit report_url(@report)
|
||||
click_on "Edit this report", match: :first
|
||||
click_on 'Prüfbericht bearbeiten', match: :first
|
||||
|
||||
fill_in "Comment", with: @report.comment
|
||||
fill_in "Name", with: @report.name
|
||||
click_on "Update Report"
|
||||
|
||||
assert_text "Report was successfully updated"
|
||||
click_on "Back"
|
||||
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
|
||||
test 'should destroy Report' do
|
||||
visit report_url(@report)
|
||||
click_on "Destroy this report", match: :first
|
||||
|
||||
assert_text "Report was successfully destroyed"
|
||||
click_on 'Prüfbericht löschen', match: :first
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue