Skip to content

Commit

Permalink
test: readded failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed May 5, 2024
1 parent 331129a commit 11f7956
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion 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
*/
export async function logOutUser(page) {
async function logOutUser(page) {
// Logging out
await expect(page).toClick("#lateralMenuButton");
await expect(page).toClick("button[data-testid='LogOut']");
Expand Down
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]
*/
export async function registerUserFromRootDirectory(username, page) {
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.
*/
export async function waitForPageToLoad(timeout_ms = 6000) {
async function waitForPageToLoad(timeout_ms = 6000) {
await new Promise(resolve => setTimeout(resolve, timeout_ms));

}
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
testMatch: ["**/playing_full_game_pos*.steps.js","**/about.steps.js"],
testMatch: ["**/playing_full_game_pos*.steps.js","**/about.steps.js", "**/login_positive.steps.js"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
testTimeout: 30000
}
7 changes: 3 additions & 4 deletions webapp/e2e/steps/login_positive.steps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { registerUserFromRootDirectory}from '../e2e_utils/e2e_utils_register.js';
import { logOutUser } from '../e2e_utils/e2e_utils_logout.js';
import { waitForPageToLoad } from '../e2e_utils/e2e_utils_timeout.js';

const { logOutUser } = require('../e2e_utils/e2e_utils_logout.js');
const { waitForPageToLoad } = require('../e2e_utils/e2e_utils_timeout.js')
const { registerUserFromRootDirectory } = require('../e2e_utils/e2e_utils_register.js')
const { defineFeature, loadFeature }=require('jest-cucumber');
const puppeteer = require('puppeteer');
const setDefaultOptions = require("expect-puppeteer").setDefaultOptions;
Expand Down

0 comments on commit 11f7956

Please sign in to comment.