bmstu-mt-wp/tests/timer.js

31 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module.exports = {
'Timer is switching to the next slide when finished': function (test) {
test
.open('http://localhost:7497/tests/?full#3')
.wait(5000)
.assert.attr('[id="4"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
'Timer becomes Active and switching to the next slide when finished': function (test) {
test
.open('http://localhost:7497/tests/?full#4')
.sendKeys('body', '\uE012') // Left
.wait(5000)
.assert.attr('[id="4"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
'Left Arrow key is skipping timer while its not finished': function (test) {
test
.open('http://localhost:7497/tests/?full#3')
.sendKeys('body', '\uE012') // Left
.assert.attr('[id="2"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
'Right Arrow key is skipping timer while its not finished': function (test) {
test
.open('http://localhost:7497/tests/?full#3')
.sendKeys('body', '\uE014') // Right
.assert.attr('[id="4"]', 'class').to.contain('active', 'Next slide is Active')
.done();
}
};