Keegan George 9cd14b0003
DEV: Move composer AI helper to toolbar (#796)
Previously we had moved the AI helper from the options menu to a selection menu that appears when selecting text in the composer. This had the benefit of making the AI helper a more discoverable feature. Now that some time has passed and the AI helper is more recognized, we will be moving it back to the composer toolbar.

This is better because:
- It consistent with other behavior and ways of accessing tools in the composer
- It has an improved mobile experience
- It reduces unnecessary code and keeps things easier to migrate when we have composer V2.
- It allows for easily triggering AI helper for all content by clicking the button instead of having to select everything.
2024-09-13 11:59:30 -07:00

28 lines
599 B
Ruby

# 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
find(".d-modal__footer button.confirm", wait: 5).click
end
def discard_changes
find(".d-modal__footer button.discard", wait: 5).click
end
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