Closed mkreth closed 1 year ago
@amtrack I'm aware that tests are missing. I wanted to get this out to you, so you could have a look whether this is going in the right direction.
The button in the Recycle Bin lightning page does not have a unique identifier. To work around this, this plugin queries the label of the button action via the UI API and clicks the button with that label. In the next, modal confirmation dialog, the plugin simply clicks on the last button in the bottom bar of the modal. As long as Salesforce keeps their sequence of buttons (Cancel - Ok, Cancel - Empty, etc) this will work.
Adds a new plugin EmptyOrgRecycleBin that will navigate to the Recycle Bin Lightning Page (
/lightning/o/DeleteEvent/home
) and press the "Empty Org Recycle Bin" button.As this does not represent a "setting" in Salesforce, the plugin will simply always return
{ enabled: false }
from itsretrieve()
method. To empty the org recycle bin, apply the following setting (withenabled
set totrue
):This will execute the plugins
apply
method and empty the recycle bin.Closes #486