discourse/spec/system/page_objects/pages/admin_web_hook_events.rb
Guhyoun Nam c13f64d35b
FEATURE: Add Filter for Webhook Events by Status (#27332)
* FEATURE: Add Filter for Webhook Events by Status

* Fixing multiple issues

* Lint

* Fixing multiple issues

* Change the range of the status for webhook events
2024-06-07 10:26:00 -05:00

33 lines
718 B
Ruby

# frozen_string_literal: true
module PageObjects
module Pages
class AdminWebHookEvents < PageObjects::Pages::Base
def visit(id)
page.visit("/admin/api/web_hooks/#{id}")
self
end
def click_filter_all
find(".select-kit-header", text: "All Events").click
end
def click_filter_delivered
find(".select-kit-row", text: "Delivered").click
end
def click_filter_failed
find(".select-kit-row", text: "Failed").click
end
def has_web_hook_event?(id)
page.has_css?("li .event-id", text: id)
end
def has_no_web_hook_event?(id)
page.has_no_css?("li .event-id", text: id)
end
end
end
end