hackatime/test/system/settings/test_helpers.rb
Mahad Kalam 44777ad644
Data export fix + async exports + more tests (#989)
* Fix data export + Capybara

* Continue?

* A ton of system tests :D + test cleanup

* More system tests

* Add placeholder keys for tests?

* Get rid of the double-query!

* Speed up CI Chrome setup by avoiding snap installs

* Pin CI Chrome version to reduce system test flakiness

* Stabilize integrations settings system test interaction
2026-02-21 11:28:21 +00:00

24 lines
546 B
Ruby

module SettingsSystemTestHelpers
private
def assert_settings_page(path:, marker_text:)
visit path
assert_current_path path, ignore_query: true
assert_text "Settings"
assert_text marker_text
end
def choose_select_option(select_id, option_text)
find("##{select_id}").click
assert_selector ".dashboard-select-popover"
within ".dashboard-select-popover" do
find("[role='option']", text: option_text, match: :first).click
end
end
def within_modal(&)
within ".bits-modal-content", &
end
end