This is my popover that appears when you hover over it:

This is what html do looks like , and popover is added to the DOM:
<span
tariff-popover="popover.car2go.airport"
class="ng-isolate-scope">
<span ng-transclude="">
<span class="ng-binding ng-scope">
Airport Fee
</span>
</span>
<span
popover-placement="right"
uib-popover-html="text"
popover-trigger="mouseenter"
class="fa fa-info-circle">
</span>
</span>
This is after seen that popover:
<span
tariff-popover="popover.car2go.airport"
class="ng-isolate-scope">
<span ng-transclude="">
<span class="ng-binding ng-scope">
Airport Fee
</span>
</span>
<span
popover-placement="right"
uib-popover-html="text"
popover-trigger="mouseenter"
class="fa fa-info-circle">
</span>
<div
tooltip-animation-class="fade"
uib-tooltip-classes=""
ng-class="{ in: isOpen() }"
uib-popover-html-popup=""
title=""
content-exp="contentExp()"
placement="right"
popup-class=""
animation="animation"
is-open="isOpen"
origin-scope="origScope"
style="visibility: visible; display: block; top: -41px; left: 108.984px;"
class="ng-isolate-scope right fade popover in">
<div class="arrow">
</div>
<div class="popover-inner">
<div
class="popover-content ng-binding"
ng-bind-html="contentExp()">
4,90β¬ for all rides to and from the airport
</div>
</div>
</div>
</span>
I want to check if the text is empty. In my test, I check that there is a type string 4,90β¬ for all rides to and from the airport. This line should not be empty.
This is part of my regexp-conf transporter to check if the element is not empty and how long the browser should wait before checking:
params: {
regexNotEmpty: '^(?!\s*$).+',
sleepTimeout: 1000
},
This is my protractor test:
describe('car2go test all input fields and checkboxes', function() {
beforeEach(function() {
browser.get('http://localhost:9999/#/car2go');
browser.waitForAngular();
});
it('should display the popover-content on mouseover', function() {
var path = 'span[tariff-popover="popover.car2go.airport"]';
var pathIcon = path + ' > .fa.fa-info-circle';
var pathPopover = path + ' > .popover.ng-isolate-scope.right.fade.in';
var popoverIcon = element(by.css(pathIcon));
browser.actions().mouseMove(popoverIcon).perform();
var popover = element(by.css(pathPopover));
expect(popover.isDisplayed()).toBeTruthy();
browser.sleep(browser.params.sleepTimeout);
expect(popover.getText()).toMatch(browser.params.regexNotEmpty);
});
});
i , popover. . 1 , popover , , .
, Chrome, Firefox, . , ? 5 , , ?