VulpesOS/gaia/dev_apps/music-oga/test/marionette/lib/playerhelper.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

28 lines
727 B
JavaScript
Executable file

/* global module, require */
'use strict';
var assert = require('assert');
var PlayerHelper = {
// check the order of the rating stars.
checkRatingStarsOrder: function(stars) {
var expected = 1;
stars.forEach(function(element) {
// we always assume the stars are in DOM order. There is no reason
// they wouldn't be.
var value = element.getAttribute('data-rating');
assert.equal(value, expected);
expected++;
});
},
checkEmptyRating: function(stars) {
stars.forEach(function(elem) {
assert.equal(elem.getAttribute('class').indexOf('star-on'), -1,
'Check empty rating. Star is on. Should be off');
});
}
};
module.exports = PlayerHelper;