fix(ci): e2e - fixtures copiees dans le container (docker cp) + 2 tests obsolètes mis a jour
CI / lint (push) Successful in 27s
CI / security (push) Successful in 18s
CI / test (push) Successful in 34s
CI / build (push) Successful in 12s
CI / e2e (push) Failing after 24m15s

- ci.yml e2e : les bind mounts C:\dev\git\python\ObsiGate sont vides en docker-in-docker (chemin du job container inexistant sur l hote) -> docker create + docker cp des fixtures + docker start

- obsigate.spec.ts : placeholder de recherche attendu mis a jour (Rechercher dans toutes les vaults...)

- obsigate.spec.ts : theme par defaut accepte defaut-obsigate (moteur themes.js) en plus de dark (ui.js legacy)
This commit is contained in:
2026-08-24 19:37:30 -04:00
parent 62eabb2944
commit b812afabbc
2 changed files with 14 additions and 7 deletions
+10 -4
View File
@@ -125,7 +125,7 @@ jobs:
- name: Start ObsiGate - name: Start ObsiGate
run: | run: |
docker rm -f obsigate-e2e 2>/dev/null || true docker rm -f obsigate-e2e 2>/dev/null || true
docker run -d --name obsigate-e2e -p 2029:8080 \ docker create --name obsigate-e2e -p 2029:8080 \
-v $(pwd)/test_vault:/vaults/TestVault \ -v $(pwd)/test_vault:/vaults/TestVault \
-v $(pwd)/test_dir:/vaults/TestDir \ -v $(pwd)/test_dir:/vaults/TestDir \
-e VAULT_1_NAME=TestVault \ -e VAULT_1_NAME=TestVault \
@@ -134,9 +134,15 @@ jobs:
-e DIR_1_PATH=/vaults/TestDir \ -e DIR_1_PATH=/vaults/TestDir \
-e OBSIGATE_AUTH_ENABLED=false \ -e OBSIGATE_AUTH_ENABLED=false \
obsigate:ci obsigate:ci
# Docker-in-docker : le port publié est joignable via l'IP de la # Docker-in-docker : le bind mount $(pwd)/... pointe sur un chemin
# passerelle (localhost dans le job container ne voit pas le port # du job container, inexistant sur l'hôte → montage vide. Les -v
# publié sur l'hôte). # créent quand même /vaults/* dans le container ; on y copie les
# fixtures avant le démarrage (l'indexeur scanne au démarrage).
docker cp test_vault/. obsigate-e2e:/vaults/TestVault
docker cp test_dir/. obsigate-e2e:/vaults/TestDir
docker start obsigate-e2e
# Le port publié est joignable via l'IP de la passerelle (localhost
# du job container ne voit pas le port publié sur l'hôte).
GW=$(ip route show default | awk '{print $3}' || echo 172.17.0.1) GW=$(ip route show default | awk '{print $3}' || echo 172.17.0.1)
echo "Gateway IP: $GW" echo "Gateway IP: $GW"
# Wait for health check # Wait for health check
+4 -3
View File
@@ -73,7 +73,7 @@ test.describe('Dashboard & Navigation', () => {
test('should show search bar in header', async ({ page }) => { test('should show search bar in header', async ({ page }) => {
await goHome(page); await goHome(page);
await expect(page.locator('#search-input')).toBeVisible(); await expect(page.locator('#search-input')).toBeVisible();
await expect(page.locator('#search-input')).toHaveAttribute('placeholder', 'Rechercher ...'); await expect(page.locator('#search-input')).toHaveAttribute('placeholder', 'Rechercher dans toutes les vaults...');
}); });
test('should show floating results bar when searching', async ({ page }) => { test('should show floating results bar when searching', async ({ page }) => {
@@ -386,8 +386,9 @@ test.describe('Dark Mode', () => {
await goHome(page); await goHome(page);
const html = page.locator('html'); const html = page.locator('html');
const theme = await html.getAttribute('data-theme'); const theme = await html.getAttribute('data-theme');
// Should default to dark // Le thème par défaut est sombre : 'dark' (ui.js legacy) ou
expect(theme).toBe('dark'); // 'defaut-obsigate' (moteur de thèmes themes.js, mode dark par défaut)
expect(['dark', 'defaut-obsigate']).toContain(theme);
}); });
test('should toggle theme and persist', async ({ page }) => { test('should toggle theme and persist', async ({ page }) => {