This repository has been archived by the owner on Jul 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix spelling * change brief to opportunity * changed to reflect the new frontend login screen * changed to smaller dd * change brief to opportunity * change to yyyy * fixed up login tests to reflect the new login screen * add sleep since seller login is too quick
- Loading branch information
Showing
6 changed files
with
15 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,13 @@ import * as util from "../../utils"; | |
|
||
describe("should fail sign in", function() { | ||
const testCases = [ | ||
{ args: ["a", ""], expected: ["a", "You must provide a valid email address"] }, | ||
{ args: ["[email protected]", ""], expected: ["a", "You must provide your password"] }, | ||
{ args: ["[email protected]", "a"], expected: ["p", "Make sure you've entered the right email address and password."] }, | ||
{ args: ["[email protected]", "a"], expected: ["a", "Your password should be at least 10 characters"] } | ||
]; | ||
|
||
for (const test of testCases) { | ||
it(`sign in fails ${test.args.length} args`, async function() { | ||
await buyerLogin(test.args[0], test.args[1]); | ||
await util.clickInputButton("Sign in"); | ||
await util.matchText(test.expected[0], test.expected[1]); | ||
}); | ||
} | ||
|
@@ -19,12 +18,15 @@ describe("should fail sign in", function() { | |
describe("should sign in", function() { | ||
it("buyer should be able to login", async function() { | ||
await buyerLogin(process.env.BUYER_EMAIL, process.env.BUYER_PASSWORD); | ||
await util.clickButton("Menu"); | ||
await util.clickLink("Dashboard"); | ||
await util.matchText("h1", "Dashboard"); | ||
await signOut("buyer"); | ||
}); | ||
|
||
it("seller should be able to login", async function() { | ||
await sellerLogin(process.env.SELLER_EMAIL, process.env.SELLER_PASSWORD); | ||
await util.clickLink("Dashboard"); | ||
await util.matchText("h1", "Dashboard"); | ||
await signOut("seller"); | ||
}); | ||
|