mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
add resize test checking frame content
Moved shared methods to a head.js file
This commit is contained in:
committed by
juliandescottes
parent
569b508fd5
commit
a328e4d20e
30
test/casperjs/integration/include.js
Normal file
30
test/casperjs/integration/include.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Collection of shared methods for casperjs integration tests.
|
||||
*/
|
||||
|
||||
function evalLine(line) {
|
||||
return casper.evaluate(
|
||||
'function () {return ' + line + '}'
|
||||
);
|
||||
}
|
||||
|
||||
function getValue(selector) {
|
||||
return casper.evaluate(
|
||||
'function () { \
|
||||
return document.querySelector(\'' + selector + '\').value;\
|
||||
}');
|
||||
}
|
||||
|
||||
function isChecked(selector) {
|
||||
return casper.evaluate(
|
||||
'function () { \
|
||||
return document.querySelector(\'' + selector + '\').checked;\
|
||||
}');
|
||||
}
|
||||
|
||||
function isDrawerExpanded() {
|
||||
return casper.evaluate(function () {
|
||||
var settingsElement = document.querySelector('[data-pskl-controller="settings"]');
|
||||
return settingsElement.classList.contains('expanded');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user