From e3c3c2ab30151e90d3678fe6f73d4c2eb0d75865 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Sun, 11 May 2014 18:26:18 +0000 Subject: [PATCH] Adjust test to handle timing issue on upload modal ref #1702 -change the tests for the cover and logo image upload modal to handle a timing issue in the way they are rendered --- core/test/functional/admin/settings_test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/test/functional/admin/settings_test.js b/core/test/functional/admin/settings_test.js index e94e1b97b0..dfa194c4e8 100644 --- a/core/test/functional/admin/settings_test.js +++ b/core/test/functional/admin/settings_test.js @@ -147,7 +147,7 @@ CasperTest.begin('Ensure image upload modals display correctly', 6, function sui }); function assertImageUploaderModalThenClose() { - test.assertExists('.js-drop-zone.image-uploader', 'Image drop zone modal renders correctly'); + test.assertSelectorHasText('.description', 'Add image'); this.click('#modal-container .js-button-accept'); casper.waitForSelector('.notification-success', function onSuccess() { test.assert(true, 'Got success notification'); @@ -159,7 +159,7 @@ CasperTest.begin('Ensure image upload modals display correctly', 6, function sui this.click('#general .js-modal-logo'); }, casper.failOnTimeout(test, 'waitForOpaque #general timed out')); - casper.waitForSelector('#modal-container .modal-content', assertImageUploaderModalThenClose, + casper.waitForSelector('#modal-container .modal-content .js-drop-zone', assertImageUploaderModalThenClose, casper.failOnTimeout(test, 'No upload logo modal container appeared')); // Test Blog Cover Upload Button @@ -167,7 +167,7 @@ CasperTest.begin('Ensure image upload modals display correctly', 6, function sui this.click('#general .js-modal-cover'); }); - casper.waitForSelector('#modal-container .modal-content', assertImageUploaderModalThenClose, + casper.waitForSelector('#modal-container .modal-content .js-drop-zone', assertImageUploaderModalThenClose, casper.failOnTimeout(test, 'No upload cover modal container appeared')); });