-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test reformating. #1690
Comments
@jlipps can you check this https://github.com/sebv/appium/compare/wd_promise_chain, reformated safari tests (including web view helper), it's working and is faster. Am planning to convert the whole suite on this model. |
my biggest concern is the change from beforeEach/afterEach to beforeAll/afterAll in driverblock. This will likely break most of the tests. Each test is written with the assumption that it is run in a clean session. What are you doing to address this? Also, we'll probably rewrite all the tests using yiewd at some point, so be forewarned :-) |
Does yiewd produce more readable code than promise chains? |
According to me. It's one of those taste things though. Multi-line chains always frustrate me. But others can't stand the |
@jlipps the tests can also be run in isolation, but I am planning to make the beforeEach/before switch configurable later, and do more work on describe. It's not manageable to have a session for each test in dev. Those are not your regular multiline-chain (which I deprecated in wd), they are promise first, and execute like promises, It is very easy to break the chain by calling I wouldn't mind yiewd, but it requires 0.11 or regenerator, so it's more something for the future. btw yiewd should also use promiseChain in the background, since you can |
OK, but I think we need to make the beforeEach/before switch configurable now, or else leave the default as is---driverblock is used for all the native tests as well and I am pretty sure things will break if we don't keep it as beforeEach/afterEach for now. |
No worry, I'll make sure all the existing test pass (This is what takes me the most time), I'll see what is best for the native test when I am converting the code. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I've started reformatting the tests using newer/better wd syntax. You can see a sample here (Don't try to run it yet, it's not ready):
https://github.com/sebv/appium/blob/wd_promise_chain/test/helpers/webview.js
Let me know if it is ok, and I'll do the whole suite like that.
The text was updated successfully, but these errors were encountered: