Closed drptbl closed 8 years ago
Also I tried to fix second problem with "angular could not be found on the window" error with this:
it('should redirect user to cookie page after click on more.. text', function() {
loginPage.cookieMore().click().then(function() {
expect(browser.getCurrentUrl()).toEqual(browser.baseUrl + urls.cookiesPage());
expect(loginPage.cookieFrame().isPresent()).toBeTruthy();
expect(loginPage.cookieText().isPresent()).toBeTruthy();
expect(loginPage.cookieMore().isPresent()).toBeTruthy();
expect(loginPage.cookieAcceptButton().isPresent()).toBeTruthy();
});
});
without success. Found it somewhere on stackoverflow. With this change made I received this error more often than before (or it was just a bad luck).
Hint: When this step is executed:
loginPage.cookieMore().click();
I'm moving from one Angular app to another. And this is probably causing the whole issue for me because I'm not doing this anywhere yet, only in this step (and issue exist only in this case actually, no problems with other steps).
Note: In future I'm going to move between angular apps a lot (our service is built on several angular apps). So I really need a good resolve for this issue if this is the cause of the problem.
For your first question of why some animations don't turn off, are you sure those are Angular-compatible animations? This might help: https://github.com/angular/protractor/issues/2448#issuecomment-135181706
For the second question, is your login page Angular? If not, that'll be why. You'll find a lot of question on stackoverflow on this topic: http://stackoverflow.com/search?q=protractor+non+angular+pages.
For further questions, please ask directly on stackoverflow as we want to reserve github for features, bugs and pull requests
Ad 1. Yes, all animations are angular-compatible, and the point is - it's the same animation not working after going from first angular app to second (it's copied from first to second and it's cookie window saying that you have to accept cookie policy). Ad 2. Yeah, all pages are wrote in Angular - I have no doubts because devs are sitting next to me.
Main bugs are:
browser.wait(EC.visibilityOf(cookieWindow.cookieFrame()), 5000);
chance of error being thrown is less but it still shows up sometimes.Thanks for reopening my issue :+1: ! It really needs further investigation.
I think the problem here is that you're getting reloaded to an Angular website, so Protractor does not know that it needs to re-run adding the mock modules. Closing this in favor of https://github.com/angular/protractor/issues/996
Hello. Actually I'm having problems with disabling some animations in my tests.
Code I'm using is default one:
Now how it looks.. When I'm running my tests, whole test scenario is run. Each running test case is working good without animations, but one of them got animations and they're not turned off, I dont know why.
Whole suite is available here: https://github.com/drptbl/protractortesting You are able to run it on yours machine.
I'm talking about this step (located in loginPageSpec.js file):
So basically.. my test cases are all run on some login page and this test case above gets redirected to another website when
is executed. When it's executed and we're moving to other website - all animations are loaded normally (you can observe this when you look at cookie frame in left bottom corner - on all test cases its popping out instantly, on this one test case mentioned above its fading with animation). Why is this happening? Also this test case is really problematic and something is wrong because sometimes (yeah, really sometimes, got no idea why sometimes it works, sometimes not) it throws me this error:
And I have no idea why it's happening. Any suggestions?
Two problems here:
Would love to fix this and hear yours opinion. Regards, drptbl.