Links, mainly...
Some checks failed
/ Run system tests (push) Waiting to run
/ Build, push and deploy image (push) Blocked by required conditions
/ Run tests (push) Has been cancelled
/ Checkout (push) Successful in 8m9s

This commit is contained in:
david 2024-07-26 00:59:00 +02:00
parent fd42a3f173
commit 21ab02d647
69 changed files with 2258 additions and 155 deletions

View file

@ -14,7 +14,7 @@ class ChecklistsTest < ApplicationSystemTestCase
visit checklists_url
click_on 'Checkliste hinzufügen'
fill_in_rich_text_area 'Details', with: @checklist.description
fill_in_rich_text_area 'Details', with: @checklist.description_html
fill_in 'Überschrift', with: @checklist.name
click_on 'Checkliste erstellen'
end
@ -23,7 +23,7 @@ class ChecklistsTest < ApplicationSystemTestCase
visit checklist_url(@checklist)
click_on 'Checkliste bearbeiten', match: :first
fill_in_rich_text_area 'Details', with: @checklist.description
fill_in_rich_text_area 'Details', with: @checklist.description_html
fill_in 'Überschrift', with: @checklist.name
click_on 'Checkliste aktualisieren'
end

View file

@ -39,6 +39,7 @@ class ChecksTest < ApplicationSystemTestCase
end
test 'fail' do
skip
assert false
end
end

View file

@ -14,7 +14,7 @@ class ElementsTest < ApplicationSystemTestCase
visit elements_url
click_on 'Element hinzufügen'
fill_in_rich_text_area 'Details', with: @element.description
fill_in_rich_text_area 'Details', with: @element.description_html
fill_in 'Pfad', with: @element.path
fill_in 'Beschreibung', with: @element.title
click_on 'Element erstellen'
@ -24,7 +24,7 @@ class ElementsTest < ApplicationSystemTestCase
visit element_url(@element)
click_on 'Element bearbeiten', match: :first
fill_in_rich_text_area 'Details', with: @element.description
fill_in_rich_text_area 'Details', with: @element.description_html
fill_in 'Pfad', with: @element.path
fill_in 'Beschreibung', with: @element.title
click_on 'Element aktualisieren'

View file

@ -0,0 +1,36 @@
require 'application_system_test_case'
class LinkCategoriesTest < ApplicationSystemTestCase
setup do
@link_category = link_categories(:one)
end
test 'visiting the index' do
visit link_categories_url
assert_selector 'h1', text: 'Linkkategorien'
end
test 'should create Linkkategorie' do
visit link_categories_url
click_on 'Linkkategorie hinzufügen'
fill_in_rich_text_area 'Beschreibung', with: @link_category.description_html
fill_in 'Name', with: @link_category.name
click_on 'Linkkategorie erstellen'
end
test 'should update Link category' do
visit link_category_url(@link_category)
click_on 'Linkkategorie bearbeiten', match: :first
fill_in_rich_text_area 'Beschreibung', with: @link_category.description_html
fill_in 'Name', with: @link_category.name
click_on 'Linkkategorie aktualisieren'
end
test 'should destroy Link category' do
link_category = link_categories(:deletable)
visit link_category_url(link_category)
click_on 'Linkkategorie löschen', match: :first
end
end

37
test/system/links_test.rb Normal file
View file

@ -0,0 +1,37 @@
require 'application_system_test_case'
class LinksTest < ApplicationSystemTestCase
setup do
@link = links(:one)
end
test 'visiting the index' do
visit links_url
assert_selector 'h1', text: 'Links'
end
test 'should create link' do
visit links_url
click_on 'Link hinzufügen'
select @link.link_category.name, from: 'Kategorie'
fill_in 'Linktext', with: @link.text
fill_in 'Link', with: @link.url
click_on 'Link erstellen'
end
test 'should update Link' do
visit link_url(@link)
click_on 'Link bearbeiten', match: :first
select @link.link_category.name, from: 'Kategorie'
fill_in 'Linktext', with: @link.text
fill_in 'Link', with: @link.url
click_on 'Link aktualisieren'
end
test 'should destroy Link' do
visit link_url(@link)
click_on 'Link löschen', match: :first
end
end

View file

@ -14,8 +14,8 @@ class SuccessCriteriaTest < ApplicationSystemTestCase
visit success_criteria_url
click_on 'Erfolgskriterium hinzufügen'
fill_in_rich_text_area 'Testkommentar', with: @success_criterion.comment
fill_in_rich_text_area 'Richtlinie', with: @success_criterion.description
fill_in_rich_text_area 'Testkommentar', with: @success_criterion.comment_html
fill_in_rich_text_area 'Richtlinie', with: @success_criterion.description_html
# fill_in 'Element', with: @success_criterion.element_id
# fill_in 'Level', with: @success_criterion.level
# fill_in 'Result', with: @success_criterion.result
@ -28,7 +28,7 @@ class SuccessCriteriaTest < ApplicationSystemTestCase
click_on 'Erfolgskriterium bearbeiten', match: :first
fill_in_rich_text_area 'Testkommentar', with: @success_criterion.comment_html
fill_in_rich_text_area 'Richtlinie', with: @success_criterion.description
fill_in_rich_text_area 'Richtlinie', with: @success_criterion.description_html
find('label', text: 'Bestanden', visible: true).click
fill_in 'Titel', with: 'new'
click_on 'Erfolgskriterium aktualisieren'