-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
327 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= tag.turbo_frame id: "tag-form-visible-#{@tag.id}" do %> | ||
<%= form_with model: @tag, url: admin_tenant_tag_path(Current.tenant, @tag), method: :patch do |form| %> | ||
<%= form_with model: @tag, url: admin_tenant_tag_path(Current.tenant, @tag), title: "Zmeniť viditeľnosť štítku", method: :patch do |form| %> | ||
<%= form.hidden_field :visible, value: [email protected] %> | ||
<%= form.button class: "#{@tag.visible ? "bg-indigo-600" : "bg-gray-200"} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2", role: :switch, aria: { checked: @tag.visible.to_s } do %> | ||
<span class="sr-only">Use setting</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
one_one: | ||
automation_rule: one | ||
type: Automation::AddMessageThreadTagAction | ||
action_object: ssd_external_visible (Tag) | ||
|
||
one: | ||
automation_rule: two | ||
type: Automation::AddMessageThreadTagAction | ||
action_object: ssd_construction (Tag) | ||
|
||
two: | ||
automation_rule: three | ||
automation_rule: two | ||
type: Automation::AddMessageThreadTagAction | ||
action_object: ssd_office (Tag) | ||
|
||
three: | ||
automation_rule: four | ||
automation_rule: three | ||
type: Automation::AddMessageThreadTagAction | ||
action_object: ssd_print (Tag) | ||
|
||
four: | ||
automation_rule: four | ||
type: Automation::AddMessageThreadTagAction | ||
action_object: ssd_external_visible (Tag) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,11 @@ basic: | |
email: [email protected] | ||
tenant: ssd | ||
|
||
basic_two: | ||
name: Another user | ||
email: [email protected] | ||
tenant: ssd | ||
|
||
admin: | ||
name: Admin user | ||
email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
require "application_system_test_case" | ||
|
||
class GroupManagementTest < ApplicationSystemTestCase | ||
setup do | ||
sign_in_as(:admin) | ||
visit root_path | ||
click_link "Nastavenia" | ||
click_link "Skupiny" | ||
end | ||
|
||
test "admin create a new group" do | ||
click_link "Vytvoriť skupinu" | ||
|
||
fill_in "custom_group_name", with: "Dummy Group" | ||
click_button "Vytvoriť" | ||
|
||
fill_in "name_search", with: "Basi" | ||
|
||
click_button "Pridať používateľa do skupiny" | ||
click_link "Zatvoriť" | ||
|
||
assert_text "Dummy Group" | ||
end | ||
|
||
test "admin can add user to group" do | ||
within("##{dom_id(groups(:ssd_signers))}") do | ||
click_link "Zmeniť členov skupiny" | ||
end | ||
|
||
fill_in "name_search", with: "Basi" | ||
|
||
click_button "Pridať používateľa do skupiny" | ||
assert_text "Basic" | ||
click_link "Zatvoriť" | ||
end | ||
|
||
test "admin can delete a group" do | ||
assert_text "Custom group" | ||
|
||
within("##{dom_id(groups(:ssd_custom))}") do | ||
accept_alert do | ||
click_button "Zmazať skupinu" | ||
end | ||
end | ||
|
||
assert_no_text "Custom group" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
require "application_system_test_case" | ||
|
||
class TagManagementTest < ApplicationSystemTestCase | ||
setup do | ||
sign_in_as(:admin) | ||
visit root_path | ||
click_link "Nastavenia" | ||
click_link "Štítky" | ||
end | ||
|
||
test "admin can create a new simple tag" do | ||
click_link "Vytvoriť štítok" | ||
|
||
fill_in "simple_tag_name", with: "Dummy tag" | ||
click_button "Vytvoriť" | ||
|
||
assert_text "Dummy tag" | ||
end | ||
|
||
test "admin can update a simple tag" do | ||
within("##{dom_id(tags(:ssd_finance))}") do | ||
click_link "Editovať štítok" | ||
end | ||
|
||
fill_in "simple_tag_name", with: "Dummy new name" | ||
click_button "Uložiť zmeny" | ||
|
||
assert_text "Dummy new name" | ||
end | ||
|
||
test "admin can delete a tag" do | ||
within("##{dom_id(tags(:ssd_finance))}") do | ||
accept_alert do | ||
click_button "Zmazať štítok" | ||
end | ||
end | ||
|
||
assert_no_text "Finance" | ||
end | ||
end |
Oops, something went wrong.