Closed maxbritto closed 8 years ago
Is the waitForAlerts
argument necessary? Shouldn't it be that if automaticallyDismissAlerts
is called, all alert are dismissed? And if someone doesn't want an alert to be dismissed, they simply call stopDismissingAlerts
Or if it stays, I think it should be named differently, because now it implies to wait for an alert to be shown, instead of the dismissal thereof
I'm not sure because waitForAlerts
actually does wait but doesn't dismiss the alert by itself. It does the same thing as waitForLoadingIndicator
. It lets the developer chose its own way of dismissing the alert : he can take care of it on it's own if the alert matters or call automaticallyDismissAlerts
to automatically dismiss any alert that gets in the way.
Regarding your second comment, I see what you mean but then waitForLoadingIndicator
should also be renamed.
Regarding your second comment, I see what you mean but then waitForLoadingIndicator should also be renamed.
You're right.
I'm not sure because waitForAlerts actually does wait but doesn't dismiss the alert by itself. It does the same thing as waitForLoadingIndicator.
waitForLoading
indicator waits for the loading indicator to disappear, but you say that waitForAlerts
doesn't dismiss alerts? That might be confusing to users
I tried to follow the pattern of waitForLoading
and do the same : I just wait for the alert to disappear. This is based on the assumption that many developer are probably doing meaningful things with their alerts and do not want us to dismiss them as they appear.
But I've also added a print if we have been waiting for more than 2 seconds and an alert is still here : it explains how to enable the automatic dismissal if they want it. I also added documentation in setup.rb
Hey @maxbritto thank you for this!
I'm not going to merge this for now, though I think this an interesting problem, I'm concerned about adding additional dependencies and the migration path for existing setups. This could be a good candidate for getting "local helpers" or "local action" for some sort of plugin system in snapshot
so the helpers can be easily extended.
I've never seen any plugin system for fastlane/snapshot. If there is one I'd be willing to refactor this as a plug-in. But if you're asking me to help building the plugin system I'm not sure how efficient I would be since I've never done any Ruby.