Commit e3dce375 authored by Curtis Adam's avatar Curtis Adam

Fix current chimp tests

parent 0bc02bc5
......@@ -173,7 +173,7 @@
{{#unless isActiveRoute regex="create|learn|pool|shuffle"}}
<tr>
<td>{{_ "cardset.info.quantity"}}:</td>
<td>{{getQuantity this}}</td>
<td class="cardsetCardQuantity" data-quantity="{{getQuantity this}}">{{getQuantity this}}</td>
</tr>
{{/unless}}
{{#unless isActiveRoute regex="home|create|learn|pool|shuffle"}}
......
......@@ -192,7 +192,7 @@
"profile.requests"}}</a></td>
</tr>
{{/if}}
<tr id="logout" class="hidden-xs logout-dropdown">
<tr class="hidden-xs logout logout-dropdown">
<td><a class="dropdown-item" href="#"><i
class="glyphicon glyphicon-log-out"></i></a></td>
<td><a class="dropdown-item" href="#">{{_
......@@ -201,7 +201,7 @@
</table>
</div>
</li>
<li id="navbar-logout"><a href="#" id="logout"><span class="hidden-xs"><i
<li id="navbar-logout"><a href="#" class="logout logout-main"><span class="hidden-xs"><i
class="glyphicon glyphicon-log-out"></i></span><span class="visible-xs"><i
class="glyphicon glyphicon-log-out"></i> {{_
"profile.logout"}}</span>
......
......@@ -152,7 +152,7 @@ Template.main.events({
Router.go('help');
}
},
'click #logout': function (event) {
'click .logout': function (event) {
event.preventDefault();
Meteor.logout();
},
......
......@@ -15,8 +15,8 @@ module.exports = function () {
});
this.Given(/^he is on the view of a cardset$/, function () {
navigation.selectMyCardset();
countBeforeCreated = navigation.selectCardsetLink(3);
navigation.contentVisible(".carousel-inner");
navigation.selectCardsetLink(3);
countBeforeCreated = navigation.checkCardsetCardQuantity();
});
/**
* ---------------------------------------------------------------------
......@@ -45,7 +45,7 @@ module.exports = function () {
});
this.Then(/^the card should be saved$/, function () {
navigation.clickElement("#leftCarouselControl");
navigation.compareContent(".detailfront" + countBeforeCreated, "FRONTOFTHECARD", 0);
navigation.compareContent(".detailfront" + (++countBeforeCreated), "FRONTOFTHECARD", 0);
});
this.Then(/^they log out$/, function () {
navigation.logout();
......
......@@ -29,8 +29,8 @@ module.exports = {
}
},
logout: function () {
browser.waitForVisible('#logout', global.threshold);
browser.click('#logout');
browser.waitForVisible('.logout-main', global.threshold);
browser.click('.logout-main');
},
selectMyCardset: function () {
browser.waitForVisible('#cardsets', global.threshold);
......@@ -54,8 +54,12 @@ module.exports = {
}
browser.waitForVisible('#cardsetLink' + number, global.threshold);
browser.click('#cardsetLink' + number);
browser.waitForExist(".carousel-inner", global.threshold);
return browser.elements(".carousel-inner > div").value.length;
},
checkCardsetCardQuantity: function () {
browser.waitForExist("#collapseCardsetInfoButton", global.threshold);
browser.click('#collapseCardsetInfoButton');
browser.waitForExist(".cardsetCardQuantity", global.threshold);
return browser.getAttribute(".cardsetCardQuantity", "data-quantity");
},
checkUrl: function (url) {
browser.waitUntil(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment