-
-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11645 from filipefurtad0/activate_buu_toggle_by_d…
…efault_to_run_the_test_suite [BUU] Activate admin_style_v3 for most system specs
- Loading branch information
Showing
42 changed files
with
631 additions
and
343 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
30 changes: 0 additions & 30 deletions
30
spec/migrations/20240625024328_activate_admin_style_v3_for_new_users_spec.rb
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
# frozen_string_literal: true | ||
|
||
def dismiss_warning | ||
# Click dismiss on distributor warning | ||
click_button 'Dismiss' | ||
end | ||
|
||
def trigger_click(id, text) | ||
# replace node buy the elements node, for example | ||
page.find(id, text).trigger("click") | ||
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,39 @@ | ||
# frozen_string_literal: true | ||
|
||
module TomSelectHelper | ||
def tomselect_open(field_name) | ||
page.find("##{field_name}-ts-control").click | ||
end | ||
|
||
def tomselect_multiselect(value, options) | ||
tomselect_wrapper = page.find("[name='#{options[:from]}']").sibling(".ts-wrapper") | ||
tomselect_wrapper.find(".ts-control").click | ||
tomselect_wrapper.find(:css, '.ts-dropdown.multi .ts-dropdown-content .option', | ||
text: value).click | ||
end | ||
|
||
def tomselect_search_and_select(value, options) | ||
tomselect_wrapper = page.find("[name='#{options[:from]}']").sibling(".ts-wrapper") | ||
tomselect_wrapper.find(".ts-control").click | ||
# Use send_keys as setting the value directly doesn't trigger the search | ||
tomselect_wrapper.find(:css, '.ts-dropdown input.dropdown-input').send_keys(value) | ||
tomselect_wrapper.find(:css, '.ts-dropdown .ts-dropdown-content .option', text: value).click | ||
end | ||
|
||
def tomselect_select(value, options) | ||
tomselect_wrapper = page.find("[name='#{options[:from]}']").sibling(".ts-wrapper") | ||
tomselect_wrapper.find(".ts-control").click | ||
|
||
tomselect_wrapper.find(:css, '.ts-dropdown .ts-dropdown-content .option', text: value).click | ||
end | ||
|
||
def select_tom_select(value, from:) | ||
container = find(:id, from) | ||
|
||
within(container) do | ||
find('.ts-control').send_keys(value) | ||
end | ||
|
||
find('.ts-dropdown .ts-dropdown-content .option', text: /#{Regexp.quote(value)}/i).click | ||
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
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
Oops, something went wrong.