Use es6 notation in tests

This commit is contained in:
rejas
2021-04-08 21:12:56 +02:00
parent 6eba8d681c
commit d736dd92be
23 changed files with 36 additions and 53 deletions

View File

@@ -6,7 +6,7 @@ const it = global.it;
describe("Position of modules", function () {
helpers.setupTimeout(this);
var app = null;
let app = null;
describe("Using helloworld", function () {
after(function () {
@@ -25,14 +25,11 @@ describe("Position of modules", function () {
});
});
var positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third", "middle_center", "lower_third", "bottom_left", "bottom_center", "bottom_right", "bottom_bar", "fullscreen_above", "fullscreen_below"];
const positions = ["top_bar", "top_left", "top_center", "top_right", "upper_third", "middle_center", "lower_third", "bottom_left", "bottom_center", "bottom_right", "bottom_bar", "fullscreen_above", "fullscreen_below"];
var position;
var className;
for (var idx in positions) {
position = positions[idx];
className = position.replace("_", ".");
it("show text in " + position, function () {
for (const position of positions) {
const className = position.replace("_", ".");
it("should show text in " + position, function () {
return app.client.$("." + className).then((result) => {
return result.getText("." + className).should.eventually.equal("Text in " + position);
});