I'd want to write a couple of methods for one of browser automation 
libraries (Capybara) to make life of people that use it easier.

In particular I'd want to add 2 methods:
* one that expects a user action to close window
* another that expects a user action to close window. API user should be 
able to know which window was opened as a result

Currently I think about such API:

window_handle = window_opened_by(wait: 3) { find('#open-window').click }
expect { find('#close-window').click }.to close_this_window(wait: 3) # clicking 
element with id 'close-window' should close window in no more than 3 seconds

Can such API be considered RSpec like?

I don't like that those two methods look too differently. Is it possible to 
make first method more similar to the second one?

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rspec/-/0YFMy92GnxYJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to