e2e-testing

Can protractor be made to run slowly?

隐身守侯 提交于 2019-11-27 03:19:43
Is there a way to run a Angular E2E test written using protractor slowly so that I can watch what is happening? Below is my solution to do that. So basically I created a decorator for current control flow execute function, which now additionaly queues a delay of 100ms before each queued action. This needs to be run before any tests are invoked (outside describe block) var origFn = browser.driver.controlFlow().execute; browser.driver.controlFlow().execute = function() { var args = arguments; // queue 100ms wait origFn.call(browser.driver.controlFlow(), function() { return protractor.promise

Integrating Protractor with Yeoman via Grunt

孤街浪徒 提交于 2019-11-26 19:02:29
问题 I want to integrate Protractor with a scaffold produced by Yeoman. I followed a tutorial and therein, the older scenario-runner was used for setting up e2e testing (via grunt ). I would like to upgrade my scaffold and use Protractor instead. Any thoughts? 回答1: Install protractor and grunt-protractor-runner from npm : npm install protractor grunt-protractor-runner --save-dev Create a config file for protractor ( protractor.conf.js ), change specs and baseUrl to your test files and test server:

Can protractor be made to run slowly?

喜夏-厌秋 提交于 2019-11-26 10:30:48
问题 Is there a way to run a Angular E2E test written using protractor slowly so that I can watch what is happening? 回答1: Below is my solution to do that. So basically I created a decorator for current control flow execute function, which now additionaly queues a delay of 100ms before each queued action. This needs to be run before any tests are invoked (outside describe block) var origFn = browser.driver.controlFlow().execute; browser.driver.controlFlow().execute = function() { var args =