test: Setup UI test using BDD approach (#152)

This commit is contained in:
Amrita
2024-10-17 20:18:31 +02:00
committed by GitHub
parent 7f4bc1bb62
commit 4efc3be8d5
7 changed files with 131 additions and 1 deletions
@@ -0,0 +1,26 @@
module.exports = {
url: function () {
return this.api.launchUrl + "/login";
},
commands: {
logIn: function (email, password) {
return this.waitForElementVisible("@emailInput")
.setValue("@emailInput", email)
.waitForElementVisible("@passwordInput")
.setValue("@passwordInput", password)
.waitForElementVisible("@loginBtn")
.click("@loginBtn");
},
},
elements: {
emailInput: {
selector: "input[name=emailOrUsername]",
},
passwordInput: {
selector: "input[name=password]",
},
loginBtn: {
selector: "form button",
},
},
};