I need to write a conditional where the test case passes if true, but need proper error handling if false. Basically im dealing with transactions, and if there are no transactions, I need to provide proper error handling. Currently when the code below returns false, I get this error:
3) Transactions view should check transaction week Message:Expected
false to equal true.
I am new to protractor.js as of this week, so I'm trying to wrap my head around it. Any suggestions would be greatly appreciated.
it('check transaction week', function (){
browser.ignoreSynchronization = true;
transactionPage.weekFilter.click();
browser.waitForAngular();
browser.driver.sleep(5000);
var trCheck = browser.isElementPresent(transactionPage.transactionRecords);
expect(trCheck).toEqual(true);
browser.ignoreSynchronization = false;
});
Aucun commentaire:
Enregistrer un commentaire