Skip to content

Commit

Permalink
fix: about_positive_non_logged_user_seeing_about_screen.steps.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed May 5, 2024
1 parent e445f41 commit 9a3254c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
3 changes: 2 additions & 1 deletion webapp/e2e/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
testMatch: ["**/playing_full_game_pos*.steps.js","**/about.steps.js", "**/login_positive.steps.js","**/about_positive_logged_user_seeing_about_screen.steps.js"],
testMatch: ["**/playing_full_game_pos*.steps.js","**/about.steps.js", "**/login_positive.steps.js","**/about_positive_logged_user_seeing_about_screen.steps.js"
,"**/about_positive_non_logged_user_seeing_about_screen.steps.js"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
testTimeout: 30000
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { waitForPageToLoad } from '../e2e_utils/e2e_utils_timeout.js';

const { defineFeature, loadFeature }=require('jest-cucumber');
const puppeteer = require('puppeteer');
const setDefaultOptions = require("expect-puppeteer").setDefaultOptions;
Expand All @@ -9,10 +7,6 @@ let browser;


defineFeature(feature, test => {
let username = "t.about.pos"
let user;
let password;

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
Expand All @@ -26,14 +20,6 @@ defineFeature(feature, test => {
waitUntil: "networkidle0",
})
.catch(() => {});

// Registering the user before the tests
let credentials = registerUserFromRootDirectory(username, page);
email = credentials[0];
username = credentials[1];

// Logging it out
logOutUser(page);
}, 120000);

test("A non-logged user wants to see the about screen of the webpage", ({given,when,and,then}) => {
Expand All @@ -51,7 +37,7 @@ defineFeature(feature, test => {
});

then("The user is presented to the about screen", async () => {
waitForPageToLoad();
await new Promise(resolve => setTimeout(resolve, 5000)); // Waiting for page to fully load
let header = await page.$eval("h2", (element) => {
return element.innerHTML
})
Expand Down

0 comments on commit 9a3254c

Please sign in to comment.