Add tests infrastructure and tests for ocis-accounts

This commit is contained in:
jasson99
2020-07-06 16:53:22 +05:45
parent b2d891c751
commit f924285cf8
12 changed files with 2021 additions and 50 deletions
@@ -0,0 +1,13 @@
const assert = require('assert')
const { client } = require('nightwatch-api')
const { When, Then } = require('cucumber')
When('the user browses to the accounts page', function () {
return client.page.accountsPage().navigateAndWaitTillLoaded()
})
Then('user {string} should be displayed in the accounts list on the WebUI', async function (username) {
await client.page.accountsPage().accountsList(username)
const userListed = await client.page.accountsPage().isUserListed(username)
return assert.strictEqual(userListed, username)
})