From d2a7d06deae8d3b1974c0244c9e42bd3d84079e6 Mon Sep 17 00:00:00 2001 From: Waseem Daher Date: Wed, 9 Jan 2013 13:26:23 -0500 Subject: [PATCH] tests: Be more robust about detecting when the subscriptions page has loaded. We apparently cannot rely on Iago to consistently be subscribed to "Denmark", so make this determination some other way. (imported from commit 2a75b345c2d82097ab44538942af89536aac09ed) --- zephyr/tests/frontend/tests.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zephyr/tests/frontend/tests.js b/zephyr/tests/frontend/tests.js index 136efa4543..3d5f14d812 100644 --- a/zephyr/tests/frontend/tests.js +++ b/zephyr/tests/frontend/tests.js @@ -285,10 +285,12 @@ casper.then(function() { casper.click('a[href^="#subscriptions"]'); casper.test.assertUrlMatch(/^http:\/\/[^\/]+\/#subscriptions/, 'URL suggests we are on subscriptions page'); casper.test.assertExists('#subscriptions.tab-pane.active', 'Subscriptions page is active'); - casper.waitForText('Denmark'); // subscriptions need to load + // subscriptions need to load; if they have *any* subs, + // the word "Unsubscribe" will appear + casper.waitForText('Unsubscribe'); }); casper.then(function() { - casper.test.assertTextExists('Denmark', 'Initial subscriptions loaded'); + casper.test.assertTextExists('Unsubscribe', 'Initial subscriptions loaded'); casper.fill('form#add_new_subscription', {streams: 'Waseemio'}); casper.click('form#add_new_subscription input.btn.btn-primary'); casper.waitForText('Waseemio');