Commit d2aa9be3 authored by Curtis Adam's avatar Curtis Adam

Remove broken chimp test

parent dacc69c1
Feature: Learn Cards with leitner and wozniak
As a user I would like to learn cards with the leitner and wozniak algorithms.
Scenario: Learn cards with the leitner algorithm
Given I'm logged in
And I'm at the leitner statistics to check my progress
Then I'll go to the leitner learning box and answer a card
Then I'll go back to the leitner statistics view to check my progress
Scenario: Learn cards with the wozniak algorithm
Given I went to the super memo view of the cardset
Then I'll answer a card
And The algorithm should give me a new card
import * as cardset from "../../features_helper/cardset.js";
import * as navigation from "../../features_helper/navigation.js";
module.exports = function () {
'use strict';
let box1Before, box1After, box2Before, box2After, box3Before, box3After, box4Before, box4After, box5Before,
box5After, box6Before, box6After, card1, card2;
this.Given(/^I'm logged in$/, function () {
navigation.login("edu");
});
this.Then(/^I'm at the leitner statistics to check my progress$/, function () {
navigation.selectLearnset();
navigation.selectCardsetLink(3);
cardset.collapseCardsetInfo(false);
cardset.leitnerProgress();
box1Before = navigation.getContent('#boxChart', 2, 'data-box1');
box2Before = navigation.getContent('#boxChart', 2, 'data-box2');
box3Before = navigation.getContent('#boxChart', 2, 'data-box3');
box4Before = navigation.getContent('#boxChart', 2, 'data-box4');
box5Before = navigation.getContent('#boxChart', 2, 'data-box5');
box6Before = navigation.getContent('#boxChart', 2, 'data-box6');
});
this.Then(/^I'll go to the leitner learning box and answer a card$/, function () {
navigation.back();
cardset.learnBox();
navigation.clickElement('#learnShowAnswer');
navigation.clickElement('#known');
});
this.Then(/^I'll go back to the leitner statistics view to check my progress$/, function () {
navigation.leitnerWozniakBackButton();
cardset.leitnerProgress();
box1After = navigation.getContent('#boxChart', 2, 'data-box1');
box2After = navigation.getContent('#boxChart', 2, 'data-box2');
box3After = navigation.getContent('#boxChart', 2, 'data-box3');
box4After = navigation.getContent('#boxChart', 2, 'data-box4');
box5After = navigation.getContent('#boxChart', 2, 'data-box5');
box6After = navigation.getContent('#boxChart', 2, 'data-box6');
navigation.compareContent(--box1Before, box1After, 5);
navigation.compareContent(++box2Before, box2After, 5);
navigation.compareContent(box3Before, box3After, 4);
navigation.compareContent(box4Before, box4After, 4);
navigation.compareContent(box5Before, box5After, 4);
navigation.compareContent(box6Before, box6After, 4);
});
this.Given(/^I went to the super memo view of the cardset$/, function () {
navigation.back();
cardset.learnMemo();
});
this.Then(/^I'll answer a card$/, function () {
card1 = navigation.getContent('#cardCarousel > div > div', 2, 'data-id');
navigation.clickElement('#learnShowAnswer');
navigation.clickElement('#memoRate5');
});
this.Then(/^The algorithm should give me a new card$/, function () {
card2 = navigation.getContent('#cardCarousel > div > div', 2, 'data-id');
navigation.compareContent(card1, card2, 5, '', false);
navigation.leitnerWozniakBackButton();
navigation.logout();
});
};
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