Skip to content

Commit

Permalink
Arreglado e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Santiago21112001 committed Mar 10, 2024
1 parent 08ac39d commit bd195f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions webapp/e2e/steps/register-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ defineFeature(feature, test => {
given('An unregistered user', async () => {
username = "pablo"
password = "pabloasw"
await expect(page).toClick("button", { text: "Don't have an account? Register here." });

});

when('I fill the data in the form and press submit', async () => {
await expect(page).toFill('input[name="username"]', username);
await expect(page).toFill('input[name="password"]', password);
await expect(page).toClick('button', { text: 'Add User' })

});

then('A confirmation message should be shown in the screen', async () => {
await expect(page).toMatchElement("div", { text: "User added successfully" });

});
})

Expand Down
6 changes: 3 additions & 3 deletions webapp/e2e/test-environment-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ async function startServer() {
mongoserver = await MongoMemoryServer.create();
const mongoUri = mongoserver.getUri();
process.env.MONGODB_URI = mongoUri;
userservice = await require("../../users/userservice/user-service");
authservice = await require("../../users/authservice/auth-service");
gatewayservice = await require("../../gatewayservice/gateway-service");
userservice = require("../../users/userservice/user-service");
authservice = require("../../users/authservice/auth-service");
gatewayservice = require("../../gatewayservice/gateway-service");
}

startServer();

0 comments on commit bd195f0

Please sign in to comment.