From f5cd5a33796715e44555c7cbb092e98391e4af7b Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Sat, 18 Apr 2020 11:37:26 +0200 Subject: [PATCH] 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 --- tests/frontend/specs/pad_modal.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/frontend/specs/pad_modal.js b/tests/frontend/specs/pad_modal.js index 80752e4b8..15a8bc138 100644 --- a/tests/frontend/specs/pad_modal.js +++ b/tests/frontend/specs/pad_modal.js @@ -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'); } });