mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
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 none
This commit is contained in:
parent
b06324ad80
commit
f5cd5a3379
1 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
describe('Pad modal', function() {
|
describe('Pad modal', function() {
|
||||||
context('when modal is a "force reconnect" message', function() {
|
context('when modal is a "force reconnect" message', function() {
|
||||||
var MODAL_SELECTOR = '#connectivity .slowcommit';
|
var MODAL_SELECTOR = '#connectivity';
|
||||||
|
|
||||||
beforeEach(function(done) {
|
beforeEach(function(done) {
|
||||||
helper.newPad(function() {
|
helper.newPad(function() {
|
||||||
|
@ -10,7 +10,7 @@ describe('Pad modal', function() {
|
||||||
// wait for modal to be displayed
|
// wait for modal to be displayed
|
||||||
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
||||||
helper.waitFor(function() {
|
helper.waitFor(function() {
|
||||||
return $modal.is(':visible');
|
return $modal.hasClass('popup-show');
|
||||||
}, 50000).done(done);
|
}, 50000).done(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ describe('Pad modal', function() {
|
||||||
|
|
||||||
it('does not close the modal', function(done) {
|
it('does not close the modal', function(done) {
|
||||||
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
||||||
var modalIsVisible = $modal.is(':visible');
|
var modalIsVisible = $modal.hasClass('popup-show');
|
||||||
|
|
||||||
expect(modalIsVisible).to.be(true);
|
expect(modalIsVisible).to.be(true);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ describe('Pad modal', function() {
|
||||||
|
|
||||||
it('does not close the modal', function(done) {
|
it('does not close the modal', function(done) {
|
||||||
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
var $modal = helper.padChrome$(MODAL_SELECTOR);
|
||||||
var modalIsVisible = $modal.is(':visible');
|
var modalIsVisible = $modal.hasClass('popup-show');
|
||||||
|
|
||||||
expect(modalIsVisible).to.be(true);
|
expect(modalIsVisible).to.be(true);
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ describe('Pad modal', function() {
|
||||||
|
|
||||||
var isModalOpened = function(modalSelector) {
|
var isModalOpened = function(modalSelector) {
|
||||||
var $modal = helper.padChrome$(modalSelector);
|
var $modal = helper.padChrome$(modalSelector);
|
||||||
return $modal.is(':visible');
|
|
||||||
|
return $modal.hasClass('popup-show');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue