<h1 class="page-header">Teams<span class="badge team-cnt-badge" data-toggle="tooltip" data-original-title="Total {{teamCnt}} Teams">{{teamCnt}}</span></h1>
Upon viewing the header on the page, you will notice it displays a text string Teams with a tooltip indicating the total number of teams.
To confirm whether the Teams text is consistently present, I have written the following:
it('Search the page header contains key words', function() {
var teamTitle = element(by.tagName('h1'));
expect(teamTitle.getText()).toBe('Teams');
//An error is reported as the actual return value is something like Team136 });
Is there a way to ensure that the teamTitle
variable only returns the text Teams? Please advise.
Appreciate your help.