I am currently developing an automation test using Protractor for an application that receives a large volume of push notifications. The issue I am facing is testing a simple logic.
expect(A + B).toEqual(C);
The problem arises because A, B, and C are sourced from different points in time which causes the test to fail. Is there a way to pause the browser to receive the push notification, run the test, and then continue once the test is completed?
If there are alternative methods to achieve this, I would greatly appreciate any suggestions.
element.all(by.css('#footer > span')).getTest().then(function(information){
expect(information[0] + information[1]).toEqual(information[2]);
});