Added projects
This commit is contained in:
parent
0964187f22
commit
8b4ffb83ec
37 changed files with 470 additions and 1935 deletions
47
test/system/projects_test.rb
Normal file
47
test/system/projects_test.rb
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
require "application_system_test_case"
|
||||
|
||||
class ProjectsTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@project = projects(:one)
|
||||
login_test
|
||||
end
|
||||
|
||||
teardown do
|
||||
logout
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit projects_url
|
||||
assert_selector "h1", text: "Projekte"
|
||||
end
|
||||
|
||||
test "should create project" do
|
||||
visit projects_url
|
||||
click_on "Projekt hinzufügen"
|
||||
|
||||
fill_in "Name", with: @project.name
|
||||
click_on "Projekt erstellen"
|
||||
|
||||
assert_text "Project was successfully created"
|
||||
click_on "Projekte Liste"
|
||||
end
|
||||
|
||||
test "should update Project" do
|
||||
visit project_url(@project)
|
||||
click_on "Projekt bearbeiten", match: :first
|
||||
|
||||
fill_in "Name", with: @project.name
|
||||
click_on "Projekt aktualisieren"
|
||||
|
||||
assert_text "Project was successfully updated"
|
||||
click_on "Projekte Liste"
|
||||
end
|
||||
|
||||
test "should destroy Project" do
|
||||
empty = Project.create!(name: "empty")
|
||||
visit project_url(empty)
|
||||
click_on "Projekt löschen", match: :first
|
||||
|
||||
assert_text "Project was successfully destroyed"
|
||||
end
|
||||
end
|
||||
|
|
@ -13,12 +13,12 @@ class ReportsTest < ApplicationSystemTestCase
|
|||
end
|
||||
|
||||
test "visiting the index" do
|
||||
visit reports_url
|
||||
visit project_reports_url(@report.project)
|
||||
assert_selector "h1", text: "Prüfberichte"
|
||||
end
|
||||
|
||||
test "should create report" do
|
||||
visit reports_url
|
||||
visit project_reports_url(@report.project)
|
||||
click_on "Prüfbericht hinzufügen"
|
||||
|
||||
fill_in_rich_text_area "Projektbeschreibung", with: @report.comment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue