##// END OF EJS Templates
minor fixes in dashboard tests...
MinRK -
Show More
@@ -6,19 +6,20 casper.get_list_items = function () {
6 6 return {
7 7 link: $(this).attr('href'),
8 8 label: $(this).find('.item_name').text()
9 }
9 };
10 10 }));
11 11 });
12 }
12 };
13 13
14 14 casper.test_items = function (baseUrl) {
15 15 casper.then(function () {
16 16 var items = casper.get_list_items();
17 17 casper.each(items, function (self, item) {
18 if (!item.label.match('.ipynb$')) {
18 if (!item.label.match(/\.ipynb$/)) {
19 19 var followed_url = baseUrl+item.link;
20 if (!followed_url.match('/\.\.$')) {
20 if (!followed_url.match(/\/\.\.$/)) {
21 21 casper.thenOpen(followed_url, function () {
22 this.waitFor(this.page_loaded);
22 23 casper.wait_for_dashboard();
23 24 // getCurrentUrl is with host, and url-decoded,
24 25 // but item.link is without host, and url-encoded
@@ -31,10 +32,10 casper.test_items = function (baseUrl) {
31 32 }
32 33 });
33 34 });
34 }
35 };
35 36
36 37 casper.dashboard_test(function () {
37 38 baseUrl = this.get_notebook_server();
38 39 casper.test_items(baseUrl);
39 })
40 });
40 41
General Comments 0
You need to be logged in to leave comments. Login now