Protractor tests won't run on Angular 4 site without waitForAngularEnabled(false)

99 views
Skip to first unread message

Arshad Muhammed

unread,
Mar 14, 2019, 8:13:54 AM3/14/19
to Angular and AngularJS discussion

I have a website under test which is built with Angular 4.


My protractor tests won't run on them unless I specify waitForAngularEnabled(false) or ignoreSynchronization = true.


I have verified with the developer and the tech lead that the site is fully Angular.


Developer said that even though the site is developed with Angular, to the browser it is sent as a 'bundle'. (I am not sure what it means in dev terms).



Below is my spec file:


describe('****** Home Page Tests', function() { var frontpage = require("./Front_page.js"); beforeEach(function() { browser.waitForAngularEnabled(true) browser.get('mytesturl',50000); frontpage.Front_page_link.click() }) it('Should go to **** page', function(){ frontpage.Journey_button.click() browser.getCurrentUrl().then(function(url){ expect(url).toContain('journey/get-started') }) }) });







 

Below is my config file:




 
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');


exports
.config = {
 seleniumAddress
: 'http://localhost:4444/wd/hub',
 restartBrowserBetweenTests
: false,
 
//framework: 'jasmine2',

 specs
: [ 'spec.js' ],

 onPrepare
: function() {

 browser
.driver.manage().window().maximize()
 jasmine
.getEnv().addReporter(new Jasmine2HtmlReporter({
 savePath
: 'target/screenshots'
 
}));
 
},

 allScriptsTimeout
: 50000,


 jasmineNodeOpts
: {
 showColors
: true,
 defaultTimeoutInterval
: 100000,
 isVerbose
: true
 
}

};



 

This is the error I get:

Failed: script timeout: result was not received in 50 seconds

Pankaj Jain

unread,
Mar 14, 2019, 9:39:56 AM3/14/19
to ang...@googlegroups.com
HI Team,

Anybody knows can we integrate angular 2+ libraries in Angular 1 if yes how?

Thanks
Pankaj

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages