-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore[hotfix]:properly define test suits
- Loading branch information
Showing
12 changed files
with
690 additions
and
435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
|
||
|
||
module.exports = { | ||
// 'User should not be able to signup with invalid email ': (browser) => { | ||
// browser | ||
// .url('http://localhost:8000/signup') | ||
// .waitForElementVisible('body', 3000) | ||
// .assert.visible('h2') | ||
// .assert.containsText('h2', 'Sign Up') | ||
// .setValue('input[name=firstName]', 'steve') | ||
// .setValue('input[name=lastName]', 'steve') | ||
// .setValue('input[name=email]', 'steve') | ||
// .setValue('input[name=password]', 'steve') | ||
// .click('#signup-btn') | ||
// .waitForElementVisible('#signup-errors', 2000) | ||
// .assert.containsText('#signup-errors', 'invalid email format') | ||
// .pause(5000) | ||
// .end(); | ||
// }, | ||
'User should not be able to signup with invalid email ': (browser) => { | ||
browser | ||
.url('http://localhost:8000/signup') | ||
.waitForElementVisible('body', 3000) | ||
.assert.visible('h2') | ||
.assert.containsText('h2', 'Sign Up') | ||
.setValue('input[name=firstName]', 'steve') | ||
.setValue('input[name=lastName]', 'steve') | ||
.setValue('input[name=email]', 'steve') | ||
.setValue('input[name=password]', 'steve') | ||
.click('#signup-btn') | ||
.waitForElementVisible('#signup-errors', 2000) | ||
.assert.containsText('#signup-errors', 'invalid email format') | ||
.pause(5000) | ||
.end(); | ||
}, | ||
'User should be able to signup with complete signup details ': (browser) => { | ||
browser | ||
.url('http://localhost:8000/signup') | ||
|
@@ -34,45 +34,45 @@ module.exports = { | |
.assert.containsText('.alert', 'signed up successfully!') | ||
.pause(5000); | ||
}, | ||
// 'User should not be able to login with incorrect login details ': (browser) => { | ||
// browser | ||
// .url('http://localhost:8000') | ||
// .waitForElementVisible('body', 3000) | ||
// .assert.visible('h1') | ||
// .assert.containsText('h1', 'WEConnect you to your next business.') | ||
// .setValue('input[name=email]', '[email protected]') | ||
// .setValue('input[name=password]', 'steveqwerty') | ||
// .click('#signin-btn') | ||
// .pause(2000) | ||
// .waitForElementVisible('#signin-errors', 2000) | ||
// .assert.containsText('#signin-errors', 'User Not Found') | ||
// .pause(5000); | ||
// }, | ||
// 'User should be able login with correct login details ': (browser) => { | ||
// browser | ||
// .url('http://localhost:8000') | ||
// .waitForElementVisible('body', 3000) | ||
// .assert.visible('h1') | ||
// .assert.containsText('h1', 'WEConnect you to your next business.') | ||
// .setValue('input[name=email]', '[email protected]') | ||
// .setValue('input[name=password]', 'steve') | ||
// .click('#signin-btn') | ||
// .pause(2000) | ||
// .assert.urlEquals('http://localhost:8000/UserProfile') | ||
// .waitForElementVisible('.alert', 2000) | ||
// .assert.containsText('.alert', 'Login successful') | ||
// .pause(5000); | ||
// // browser.end(); | ||
// }, | ||
// 'Logged in user should be able to see a create business link on the NavBar ': (browser) => { | ||
// browser | ||
// .url('http://localhost:8000/UserProfile') | ||
// .waitForElementVisible('body', 3000) | ||
// .pause(2000) | ||
// .click('.reg') | ||
// .assert.urlEquals('http://localhost:8000/registerBusiness') | ||
// .pause(5000); | ||
// }, | ||
'User should not be able to login with incorrect login details ': (browser) => { | ||
browser | ||
.url('http://localhost:8000') | ||
.waitForElementVisible('body', 3000) | ||
.assert.visible('h1') | ||
.assert.containsText('h1', 'WEConnect you to your next business.') | ||
.setValue('input[name=email]', '[email protected]') | ||
.setValue('input[name=password]', 'steveqwerty') | ||
.click('#signin-btn') | ||
.pause(2000) | ||
.waitForElementVisible('#signin-errors', 2000) | ||
.assert.containsText('#signin-errors', 'User Not Found') | ||
.pause(5000); | ||
}, | ||
'User should be able login with correct login details ': (browser) => { | ||
browser | ||
.url('http://localhost:8000') | ||
.waitForElementVisible('body', 3000) | ||
.assert.visible('h1') | ||
.assert.containsText('h1', 'WEConnect you to your next business.') | ||
.setValue('input[name=email]', '[email protected]') | ||
.setValue('input[name=password]', 'steve') | ||
.click('#signin-btn') | ||
.pause(2000) | ||
.assert.urlEquals('http://localhost:8000/UserProfile') | ||
.waitForElementVisible('.alert', 2000) | ||
.assert.containsText('.alert', 'Login successful') | ||
.pause(5000); | ||
// browser.end(); | ||
}, | ||
'Logged in user should be able to see a create business link on the NavBar ': (browser) => { | ||
browser | ||
.url('http://localhost:8000/UserProfile') | ||
.waitForElementVisible('body', 3000) | ||
.pause(2000) | ||
.click('.reg') | ||
.assert.urlEquals('http://localhost:8000/registerBusiness') | ||
.pause(5000); | ||
}, | ||
'Logged in user should be able to create a business ': (browser) => { | ||
browser | ||
.url('http://localhost:8000/registerBusiness') | ||
|
@@ -89,27 +89,18 @@ module.exports = { | |
.click('button[name=save]') | ||
.pause(2000) | ||
.assert.urlEquals('http://localhost:8000/UserProfile'); | ||
// browser.end(); | ||
}, | ||
'Logged in user should be able to view business catalog, business profile and edit his/her business ': (browser) => { | ||
browser | ||
.url('http://localhost:8000/businessCatalog') | ||
.waitForElementVisible('body', 3000) | ||
.pause(10000) | ||
// .assert.visible('h1') | ||
// .assert.containsText('h1', 'Business Catalog') | ||
// .setValue('input[name=title]', 'mart.ng') | ||
// .setValue('textarea[name=description]', 'a great business') | ||
// .setValue('input[name=category]', 'technology') | ||
// .setValue('input[name=location]', 'steve') | ||
// .setValue('input[name=email]', '[email protected]') | ||
.pause(3000) | ||
.click('#find-one-business') | ||
.click('#find-one-business1') | ||
// .click('button[name=save]') | ||
.pause(2000) | ||
.assert.urlEquals('http://localhost:8000/businessProfile/1'); | ||
// browser.end(); | ||
browser.end(); | ||
}, | ||
'Should re route users to login for protected routes': (browser) => { | ||
browser | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsInVzZXJuYW1lIjoiYWxhbiIsImVtYWlsIjoiY29AZmtzLmNvbSIsImlhdCI6MTUyNjc3NDY4NX0.-ifQEPBdNquBQylvLQGvEPz1UHJTYzlTJJa3O9r1yVE'; | ||
const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsInVzZXJuYW1lIjoic3RldmUiLCJlbWFpbCI6InN0ZXZlQHN0ZXZlLmNvbSIsImlhdCI6MTUyNjc3NDY4NX0.1769zEZcgxW6nB951nEV4zEhbVdc76CDI0I0cMdyzGw'; | ||
|
||
global.token = token; |
Oops, something went wrong.