mirror of
https://github.com/wassname/talk.git
synced 2026-09-10 12:43:11 +08:00
Using testData from Install
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
commands: [{
|
||||
url: function() {
|
||||
return `${this.api.launchUrl}/admin`;
|
||||
},
|
||||
ready() {
|
||||
return this
|
||||
.waitForElementVisible('body', 2000);
|
||||
},
|
||||
}],
|
||||
elements: {
|
||||
'loginLayout': '.talk-admin-login'
|
||||
}
|
||||
};
|
||||
@@ -6,7 +6,7 @@ module.exports = {
|
||||
ready() {
|
||||
return this
|
||||
.waitForElementVisible('body', 2000);
|
||||
},
|
||||
}
|
||||
}],
|
||||
elements: {
|
||||
'getStartedButton': '.talk-install-get-started-button',
|
||||
|
||||
@@ -1,16 +1,3 @@
|
||||
const uuid = require('uuid');
|
||||
const {murmur3} = require('murmurhash-js');
|
||||
|
||||
const rHash = murmur3(uuid.v4());
|
||||
|
||||
const testData = {
|
||||
organizationName: 'Coral',
|
||||
email: `test_${rHash}@test.test`,
|
||||
username: `test${rHash}`,
|
||||
password: `testpassword${rHash}`,
|
||||
domain: 'http://localhost:3000'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
'@tags': ['install'],
|
||||
'User goes to install': (client) => {
|
||||
@@ -36,7 +23,8 @@ module.exports = {
|
||||
},
|
||||
'User fills step 2': (client) => {
|
||||
const installPage = client.page.installPage();
|
||||
|
||||
const {testData} = client.globals;
|
||||
|
||||
installPage
|
||||
.waitForElementVisible('@step2organizationNameInput')
|
||||
.setValue('@step2organizationNameInput', testData.organizationName)
|
||||
@@ -51,7 +39,8 @@ module.exports = {
|
||||
},
|
||||
'User fills step 3': (client) => {
|
||||
const installPage = client.page.installPage();
|
||||
|
||||
const {testData} = client.globals;
|
||||
|
||||
installPage
|
||||
.setValue('@step3EmailInput', testData.email)
|
||||
.setValue('@step3UsernameInput', testData.username)
|
||||
@@ -68,7 +57,8 @@ module.exports = {
|
||||
},
|
||||
'User fills step 4': (client) => {
|
||||
const installPage = client.page.installPage();
|
||||
|
||||
const testData = client.page.getTestData();
|
||||
|
||||
installPage
|
||||
.waitForElementVisible('@step4DomainInput')
|
||||
.setValue('@step4DomainInput', testData.domain);
|
||||
|
||||
Reference in New Issue
Block a user