changed fixture to have multiple users and let code it up one
This commit is contained in:
parent
a6fdbf3ae8
commit
099f346faa
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"email": "Mutoid@yopmail.com",
|
|
||||||
"password": "123456"
|
|
||||||
}
|
|
12
cypress/fixtures/users.json
Normal file
12
cypress/fixtures/users.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"Mutoid" : {
|
||||||
|
"type" : "user",
|
||||||
|
"email": "Mutoid@yopmail.com",
|
||||||
|
"password": "123456"
|
||||||
|
},
|
||||||
|
"Ovoid" : {
|
||||||
|
"type" : "user",
|
||||||
|
"email": "Ovoid@yopmail.com",
|
||||||
|
"password": "123456"
|
||||||
|
}
|
||||||
|
}
|
@ -98,16 +98,15 @@ describe('As a visitor, I can only create an account the right way.', function (
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("As a user, I can only log in and out the right way", function () {
|
describe.only("As a user, I can only log in and out the right way", function () {
|
||||||
|
|
||||||
before(function () {
|
before(function () {
|
||||||
//cy.server();
|
cy.fixture("users.json").as("users").then((users) => {
|
||||||
cy.fixture("userMutoid.json").as("Mutoid").then(() => {
|
Mutoid = users["Mutoid"];
|
||||||
expect(this.Mutoid.email).to.exist;
|
expect(Mutoid.email).to.exist;
|
||||||
expect(this.Mutoid.password).to.exist;
|
expect(Mutoid.password).to.exist;
|
||||||
Mutoid = this.Mutoid;
|
expect(Mutoid.type).eq("user");
|
||||||
});
|
});
|
||||||
//cy.route('GET', '/mutoid', 'fx:userMutoid').as("Mutoid");
|
|
||||||
})
|
})
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user