Skip to content

Commit

Permalink
test: export functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed May 5, 2024
1 parent 2b66fcc commit 7e3f3f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions webapp/e2e/e2e_utils/e2e_utils_logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const {waitForPageToLoad} = require('../e2e_utils/e2e_utils_timeout.js');
*
* @param {*} page The website
*/
async function logOutUser(page) {
export async function logOutUser(page) {
// Logging out
await expect(page).toClick("#lateralMenuButton");
await expect(page).toClick("button[data-testid='LogOut']");
Expand All @@ -23,4 +23,3 @@ async function logOutUser(page) {
expect(value).toBeTruthy();
}
modules.export = {logOutUser}

2 changes: 1 addition & 1 deletion webapp/e2e/e2e_utils/e2e_utils_register.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @param {*} page The website
* @returns An array with the credentials of the user created [email, username]
*/
async function registerUserFromRootDirectory(username, page) {
export async function registerUserFromRootDirectory(username, page) {
// Credentials for the new user
let email = username + "@email.com"
let password = username + "ps"
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/e2e_utils/e2e_utils_timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Auxiliar function that times out the tests for some time, so the page can be fully loaded.
* @param {*} timeout_ms Amount of ms to wait.
*/
async function waitForPageToLoad(timeout_ms = 6000) {
export async function waitForPageToLoad(timeout_ms = 6000) {
await new Promise(resolve => setTimeout(resolve, timeout_ms));

}
Expand Down

0 comments on commit 7e3f3f5

Please sign in to comment.