test: fix pad_modal test with new popups
Old check is jquery is(':visible') no longer works because we use css property visibility hidden (for animation to work properly), and not display nonepull/3886/head
parent
b06324ad80
commit
f5cd5a3379
|
@ -1,6 +1,6 @@
|
|||
describe('Pad modal', function() {
|
||||
context('when modal is a "force reconnect" message', function() {
|
||||
var MODAL_SELECTOR = '#connectivity .slowcommit';
|
||||
var MODAL_SELECTOR = '#connectivity';
|
||||
|
||||
beforeEach(function(done) {
|
||||
helper.newPad(function() {
|
||||
|
@ -10,7 +10,7 @@ describe('Pad modal', function() {
|
|||
// wait for modal to be displayed
|
||||
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
||||
helper.waitFor(function() {
|
||||
return $modal.is(':visible');
|
||||
return $modal.hasClass('popup-show');
|
||||
}, 50000).done(done);
|
||||
});
|
||||
|
||||
|
@ -30,7 +30,7 @@ describe('Pad modal', function() {
|
|||
|
||||
it('does not close the modal', function(done) {
|
||||
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
||||
var modalIsVisible = $modal.is(':visible');
|
||||
var modalIsVisible = $modal.hasClass('popup-show');
|
||||
|
||||
expect(modalIsVisible).to.be(true);
|
||||
|
||||
|
@ -45,7 +45,7 @@ describe('Pad modal', function() {
|
|||
|
||||
it('does not close the modal', function(done) {
|
||||
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
||||
var modalIsVisible = $modal.is(':visible');
|
||||
var modalIsVisible = $modal.hasClass('popup-show');
|
||||
|
||||
expect(modalIsVisible).to.be(true);
|
||||
|
||||
|
@ -126,6 +126,7 @@ describe('Pad modal', function() {
|
|||
|
||||
var isModalOpened = function(modalSelector) {
|
||||
var $modal = helper.padChrome$(modalSelector);
|
||||
return $modal.is(':visible');
|
||||
|
||||
return $modal.hasClass('popup-show');
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue