angularjs-e2e

AngularJS e2e tests hang when changing between two separate angular apps

余生长醉 提交于 2019-12-22 19:31:13
问题 I have a frustrating problem: I want to write end to end tests for a complex angular app. The problem is that the login screen is a separate app. The initial idea was that it would branch out to separate other angular apps in our ecosystem based on the login credentials. It works like a charm. For the tests it is a nightmare though. The tests work as expected but as soon as correct credentials are entered and the main angular app is loaded the tests just time out. No error message or debug

A Jasmine spec timed out. Resetting the WebDriver Control Flow - when redirect to new page

我的梦境 提交于 2019-12-21 12:24:04
问题 I'm bedinner in e2e testing and have a problem. When I do login - I make redirect from login.php to index.php page. But my test is fails with following errors: ..A Jasmine spec timed out. Resetting the WebDriver Control Flow. F Failures: 1) Login Page should login and redirect to overview page with CR Operators rights Message: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. Stack: Error: Timeout - Async callback was not invoked

Javascript.confirm() and Angularjs Karma e2e test

谁说胖子不能爱 提交于 2019-12-20 12:23:19
问题 I have an Angularjs application that uses simple javascript confirm before executing some actions. Controller: function TokenController($scope) { $scope.token = 'sampleToken'; $scope.newToken = function() { if (confirm("Are you sure you want to change the token?") == true) { $scope.token = 'modifiedToken'; } }; } View: <div id="tokenDiv"> Token:{{token}} <button ng-click="newToken()">New Token</button> </div> Now I want to have an end to end test to check the token is being replaced correctly

Protractor 0.16.1 e2e AngularJS - Starting selenium standalone server… events.js:72 Error: spawn ENOENT

别说谁变了你拦得住时间么 提交于 2019-12-19 07:17:31
问题 Attempted Project: https://github.com/yearofmoo/angularjs-seed-repo Environment: Windows 7 64-bit NodeJS v 0.10.24 Protractor v 0.16.1 grunt v0.4.2 grunt-cli v0.1.11 Notes: For selenium, install_selenium_standalone has been replaced by webdriver-manager binary around 12/2/13 according to [Julie's post][1]. This seems to be related to the issue. Also, git must be installed in the project directory and npm install must be run using Git Bash in Windows. Error in Git Bash: $ grunt test:e2e -

Running AngularJS Protractor with proxy to https

最后都变了- 提交于 2019-12-18 16:57:51
问题 I get the following error in the command line when trying to run Protractor: > Fatal error: protractor exited with code: 1 I need to proxy to an https test server. How do I accomplish this? I followed the advice from this Github issue, but I am still getting the above error. Here is my config file: // A reference configuration file. exports.config = { // ----- How to setup Selenium ----- // // There are three ways to specify how to use Selenium. Specify one of the // following: // // 1.

Protractor - Wait for async promise before doing next

∥☆過路亽.° 提交于 2019-12-18 12:26:36
问题 First of all, I've already checked various post and blogs concerning that point and I still can't figure out how to make it correctly. I have tried many different combinaison of : browser wait protractor.controlFlow().execute protractor.controlFlow().await( ...Still no success.. My problem Within my beforeEach function, I'd like to call a protractor promise and wait for it to resolve before performing the rest of my code. My Code I've prepared this simple test for anyone willing to help me

Protractor: Testing Angular App in an Iframe

时光毁灭记忆、已成空白 提交于 2019-12-17 16:27:50
问题 I've got an interesting setup here. I have an Angular App that loads another Angular App inside an iframe. I'm interested in testing the iframed-in Angular app with Protractor. Protractor is waiting for the first Angular app to load, but when I switch the iframe with ptor.switchTo().frame('experience'); I can see that Protractor is not waiting for the iframed Angular app before making assertions. I have tried adding ptor.waitForAngular(); After switching to the iframe with no luck. Anybody

Running into Error while waiting for Protractor to sync with the page with basic protractor test

喜欢而已 提交于 2019-12-17 11:27:23
问题 describe('my homepage', function() { var ptor = protractor.getInstance(); beforeEach(function(){ // ptor.ignoreSynchronization = true; ptor.get('http://localhost/myApp/home.html'); // ptor.sleep(5000); }) describe('login', function(){ var email = element.all(protractor.By.id('email')) , pass = ptor.findElement(protractor.By.id('password')) , loginBtn = ptor.findElement(protractor.By.css('#login button')) ; it('should input and login', function(){ // email.then(function(obj){ // console.log(

Getting the angular app to run when using protractor

不想你离开。 提交于 2019-12-13 21:28:26
问题 I must be missing something here ... I'm trying to use protractor to run e2e tests for my angular application. The configuration file is something along the lines of: allScriptsTimeout: 11000, specs: [ 'src/**/*.e2e.js' ], capabilities: { browserName: 'firefox' }, baseUrl: 'http://localhost:8000/app/', framework: 'jasmine', jasmineNodeOpts: { showColors: true, isVerbose : true, includeStackTrace : true, defaultTimeoutInterval: 30000 } The test looks something like this: describe('example test

Protractor: How to access global variables that we have inside our application?

妖精的绣舞 提交于 2019-12-13 08:57:21
问题 Hope if someone could help. I am working on an Angular based application. I am automating my End to End tests with the help of Protractor. I have a global variable set in my Application called "selectedPlatform", which conveys, for which platform(iOS/Android) I have my current application build for. I need to access this variable for me write my test cases accordingly. Any help on this ground is greatly appreciated. Thanks, Madhan 回答1: If I understand correctly, your variable is a global