The expect() function is usually used to resolve the returned promises of Protractor for testing. When not using the expect() function, You have to resolve the returned promises first through the so-called then() function!
In summary, Protractor uses the same syntaxes and styles of Jasmine, like this:
describe('Angular App Test suite 1 -', function() { it('Testcase 1: should do xx job', function() { browser.get('I don't know "/some/some" comes from! (a bug in blogger self?)'); expect(element(by.xxx).getText()).toEqual(2); ... ... }); it('Testcase 2: should do xxx job', function() { ... ... }); }); describe('Angular App Test suite 2 -', function() { it('Testcase 1: should do xx job', function() { browser.get(' '); expect(element(by.xxx).getText()).toEqual(2); ... ... }); it('Testcase 2: should do xxx job', function() { ... ... }); });
No comments:
Post a Comment