1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-02 12:05:24 +02:00

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

This commit is contained in:
Amrita 2024-10-18 00:03:31 +05:45 committed by GitHub
parent 01a7e3a57d
commit df7746f896
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 131 additions and 1 deletions

View file

@ -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",
},
},
};