mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
Feature files created to login, add users and logout
Co-authored-by: Yamuna Adhikari <adhikariamuna4444@gmail.com>
This commit is contained in:
44
test/acceptance/pageObjects/homePage.js
Normal file
44
test/acceptance/pageObjects/homePage.js
Normal file
@@ -0,0 +1,44 @@
|
||||
module.exports = {
|
||||
url: function () {
|
||||
return this.api.launchUrl + 'admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete';
|
||||
},
|
||||
|
||||
commands: [
|
||||
{
|
||||
browsedToNewUserPage: function () {
|
||||
return this.useXpath()
|
||||
.waitForElementVisible('@usersAndGroups')
|
||||
.click('@usersAndGroups')
|
||||
.waitForElementVisible('@newUser')
|
||||
.click('@newUser')
|
||||
.useCss();
|
||||
},
|
||||
|
||||
browsedToListOfUsers: function () {
|
||||
return this.useXpath()
|
||||
.waitForElementVisible('@usersAndGroups')
|
||||
.click('@usersAndGroups')
|
||||
.waitForElementVisible('@listOfUsers')
|
||||
.click('@listOfUsers')
|
||||
.useCss();
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
elements: {
|
||||
usersAndGroups: {
|
||||
selector: '//div[@class="menu_titre"]/a[@title="Users & Groups"]',
|
||||
locateStrategy: 'xpath'
|
||||
},
|
||||
|
||||
newUser: {
|
||||
selector: '//div[@class="menu_contenu menu_contenu_user_card"]/a[@title="New user"]',
|
||||
locateStrategy: 'xpath'
|
||||
},
|
||||
|
||||
listOfUsers: {
|
||||
selector: '//a[@class="vsmenu"][@title="List of users"]',
|
||||
locateStrategy: 'xpath'
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user