Skip to content

Commit 4116199

Browse files
committed
another try
1 parent 222fb1c commit 4116199

File tree

2 files changed

+17
-42
lines changed

2 files changed

+17
-42
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,7 @@ on:
2525
- 'false'
2626

2727
jobs:
28-
unit-tests:
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v4
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version: 22
35-
- run: npm --prefix users/authservice ci
36-
- run: npm --prefix users/userservice ci
37-
- run: npm --prefix users/groupservice ci
38-
- run: npm --prefix llmservice ci
39-
- run: npm --prefix gatewayservice ci
40-
- run: npm --prefix webapp ci
41-
- run: npm --prefix mathGame ci
42-
- run: npm --prefix apiservice ci
43-
- run: npm install --prefix webapp react-router-dom@6.23.1
44-
- run: npm install --save-dev --prefix webapp @babel/plugin-proposal-private-property-in-object
45-
- run: npm --prefix wikidata ci
46-
- run: npm --prefix users/authservice test -- --coverage
47-
- run: npm --prefix users/userservice test -- --coverage
48-
- run: npm --prefix users/groupservice test -- --coverage
49-
- run: npm --prefix llmservice test -- --coverage
50-
- run: npm --prefix gatewayservice test -- --coverage
51-
- run: npm --prefix webapp test -- --coverage
52-
- run: npm --prefix wikidata test -- --coverage
53-
- run: npm --prefix mathGame test -- --coverage
54-
- run: npm --prefix apiservice test -- --coverage
55-
- name: Analyze with SonarQube
56-
uses: SonarSource/sonarqube-scan-action@master
57-
env:
58-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
59-
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
60-
EMPATHY_API_KEY: ${{ secrets.EMPATHY_API_KEY }}
61-
6228
e2e-tests:
63-
needs: [unit-tests]
6429
runs-on: ubuntu-latest
6530
steps:
6631
- uses: actions/checkout@v4

webapp/e2e/steps/history.steps.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,23 @@ defineFeature(feature, test => {
100100
await expect(page).toClick("button", { text: "Login" });
101101
});
102102

103-
when('User navigates to the history page', async () => {
104-
await page.waitForFunction(
105-
() => !!Array.from(document.querySelectorAll('a')).find(a => a.textContent.trim() === 'Historial'),
106-
{ timeout: 600000 }
107-
);
108-
await expect(page).toClick('a', { text: 'Historial' });
109-
});
103+
when('User navigates to the history page', async () => {
104+
// Espera a que exista y sea visible el enlace
105+
await page.waitForFunction(
106+
() => {
107+
const a = Array.from(document.querySelectorAll('a')).find(a => a.textContent.trim() === 'Historial');
108+
return a && a.offsetParent !== null; // visible
109+
},
110+
{ timeout: 20000 }
111+
);
112+
// Screenshot para depuración
113+
await page.screenshot({ path: 'debug-historial.png' });
114+
// Log de todos los enlaces
115+
const links = await page.$$eval('a', els => els.map(e => e.textContent));
116+
console.log('Links:', links);
117+
// Ahora sí, haz click
118+
await expect(page).toClick('a', { text: 'Historial' });
119+
});
110120

111121
then('User sees a list of past games', async () => {
112122
await page.waitForSelector('h4', { text: 'Historial de Partidas', timeout: 10000 });

0 commit comments

Comments
 (0)