changed fixture to have multiple users and let code it up one

This commit is contained in:
Thoscellen 2019-08-22 13:18:23 +02:00
parent a6fdbf3ae8
commit 099f346faa
3 changed files with 18 additions and 11 deletions

View File

@ -1,4 +0,0 @@
{
"email": "Mutoid@yopmail.com",
"password": "123456"
}

View File

@ -0,0 +1,12 @@
{
"Mutoid" : {
"type" : "user",
"email": "Mutoid@yopmail.com",
"password": "123456"
},
"Ovoid" : {
"type" : "user",
"email": "Ovoid@yopmail.com",
"password": "123456"
}
}

View File

@ -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 () {
//cy.server();
cy.fixture("userMutoid.json").as("Mutoid").then(() => {
expect(this.Mutoid.email).to.exist;
expect(this.Mutoid.password).to.exist;
Mutoid = this.Mutoid;
cy.fixture("users.json").as("users").then((users) => {
Mutoid = users["Mutoid"];
expect(Mutoid.email).to.exist;
expect(Mutoid.password).to.exist;
expect(Mutoid.type).eq("user");
});
//cy.route('GET', '/mutoid', 'fx:userMutoid').as("Mutoid");
})
beforeEach(function () {