Commit 10bacfd7 authored by Curtis Adam's avatar Curtis Adam

Adjust chimp tests

parent 469710fc
......@@ -54,7 +54,7 @@
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle authorBtn" data-toggle="dropdown" role="button"
<a href="#" class="dropdown-toggle cardTypeBtn" data-toggle="dropdown" role="button"
aria-haspopup="true" aria-expanded="false">
{{_ "cardType"}}
{{#if hasCardTypeFilter}}
......@@ -301,7 +301,7 @@
<span class="col-xs-6 visible-xs poolLabel panelUnit" data-id="{{this.cardType}}">{{_ "cardType"}}
:</span>
<span class="col-xs-6 {{#unless
singleUniversity}}col-sm-2{{else}}col-sm-2 col-md-2{{/unless}} poolContent poolText panelUnit poolAuthor"
singleUniversity}}col-sm-2{{else}}col-sm-2 col-md-2{{/unless}} poolContent poolText panelUnit poolCardType"
data-id="{{this.cardType}}">{{getCardTypeName this.cardType}}</span>
</a>
<a href="#" class="filterAuthor" title="Filter {{_ "set-list.author"}}: {{getAuthorName this.owner}}">
......
......@@ -14,6 +14,26 @@ module.exports = function () {
navigation.login(username);
});
/**
* ---------------------------------------------------------------------
* Sort by card type scenario
* ---------------------------------------------------------------------
*/
this.When(/^user clicks on the filter by card type button$/, function () {
navigation.selectPool();
navigation.clickElement('a[class="dropdown-toggle cardTypeBtn"]');
});
this.Then(/^he should choose a card type/, function () {
navigation.clickElement('a[class="filterCardType"]');
});
this.Then(/^he should see the cardset list sorted by the choosen card type/, function () {
let cardsetListFilteredWord = navigation.getContent('.poolCardType', 1);
navigation.compareContent('.topicName', cardsetListFilteredWord, 1);
});
/**
* ---------------------------------------------------------------------
* Sort by author scenario
......
......@@ -3,6 +3,12 @@ Feature: Filter the pool
Background:
Given User is logged in
@watch
Scenario: User sorts by card type
When user clicks on the filter by card type button
Then he should choose a card type
Then he should see the cardset list sorted by the choosen card type
@watch
Scenario: User sorts by author
When user clicks on the filter by author button
......
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