2023-08-24 20:49:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module PageObjects
|
|
|
|
module Modals
|
|
|
|
class DiffModal < PageObjects::Modals::Base
|
|
|
|
def visible?
|
|
|
|
page.has_css?(".composer-ai-helper-modal", wait: 5)
|
|
|
|
end
|
|
|
|
|
|
|
|
def confirm_changes
|
2023-11-15 04:23:27 -05:00
|
|
|
find(".d-modal__footer button.confirm", wait: 5).click
|
2023-08-24 20:49:24 -04:00
|
|
|
end
|
|
|
|
|
2024-09-13 14:59:30 -04:00
|
|
|
def discard_changes
|
|
|
|
find(".d-modal__footer button.discard", wait: 5).click
|
2024-08-16 13:08:58 -04:00
|
|
|
end
|
|
|
|
|
2023-08-24 20:49:24 -04:00
|
|
|
def old_value
|
|
|
|
find(".composer-ai-helper-modal__old-value").text
|
|
|
|
end
|
|
|
|
|
|
|
|
def new_value
|
|
|
|
find(".composer-ai-helper-modal__new-value").text
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|