Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : UQO Éval — Le Grand Défi Immobilier8 * File : docs/consignes/captures.mjs9 * Module : docs10 * Repository : https://git.spboucher.ai/uqo-eval-jeux11 * Project Website : https://jeux.uqo-eval.app12 * Created : 2026-11-2513 * Last Modified : 2026-11-2514 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: contact@spboucher.ai23 * Development : dev@spboucher.ai24 * Support : support@spboucher.ai25 * Security/Admin : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License : None specified (no license file in this repository)34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243// Captures du site réel pour le document de consignes. Usage : node docs/consignes/captures.mjs [URL]44import { chromium, devices } from "@playwright/test";45const base = process.argv[2] ?? "https://jeux.uqo-eval.app";46const out = new URL("./captures/", import.meta.url).pathname;47const browser = await chromium.launch();48const blurNames = "#nom-liste option:not(:first-child) { color: transparent; }";49{50 const page = await (await browser.newContext({ viewport: { width: 1440, height: 900 }, deviceScaleFactor: 2, locale: "fr-CA", reducedMotion: "reduce" })).newPage();51 await page.goto(base, { waitUntil: "networkidle" }); await page.addStyleTag({ content: blurNames }); await page.waitForTimeout(1200);52 await page.screenshot({ path: out + "accueil.png" });53 await page.locator(".entry").screenshot({ path: out + "formulaire.png" });54 await page.locator(".entry-alt").click(); await page.waitForURL(/jouer/); await page.waitForTimeout(700);55 await page.screenshot({ path: out + "intro.png" });56 await page.locator(".intro button").click(); await page.waitForSelector(".choice:not([disabled])"); await page.waitForTimeout(3000);57 await page.locator(".choice").nth(2).click(); await page.waitForTimeout(300);58 await page.screenshot({ path: out + "jeu.png" });59 await page.click(".answer-submit"); await page.waitForSelector(".feedback-foot button"); await page.waitForTimeout(1500);60 await page.screenshot({ path: out + "retroaction.png" });61 await page.getByRole("button", { name: "Pause et paramètres" }).click({ force: true }).catch(() => {});62 await page.waitForTimeout(600); await page.locator("dialog[open]").screenshot({ path: out + "pause.png" }).catch(() => {});63 await page.goto(base + "/classement", { waitUntil: "networkidle" }); await page.waitForTimeout(1500);64 await page.screenshot({ path: out + "classement.png" });65}66{67 const page = await (await browser.newContext({ ...devices["iPhone 14"], locale: "fr-CA", reducedMotion: "reduce" })).newPage();68 await page.goto(base, { waitUntil: "networkidle" }); await page.waitForTimeout(800);69 await page.screenshot({ path: out + "mobile-accueil.png" });70 await page.locator(".entry-alt").click(); await page.waitForURL(/jouer/); await page.locator(".intro button").click();71 await page.waitForSelector(".choice:not([disabled])"); await page.waitForTimeout(4000);72 await page.locator(".choice").nth(1).click(); await page.waitForTimeout(300);73 await page.screenshot({ path: out + "mobile-jeu.png" });74 await page.click(".answer-submit"); await page.waitForSelector(".feedback-foot button"); await page.waitForTimeout(1400);75 await page.screenshot({ path: out + "mobile-retroaction.png" });76}77await browser.close();78