feat: add end-to-end tests for Agents, Chat, Navigation, and Settings screens

This commit is contained in:
Jonathan Atta
2026-03-03 14:47:44 +01:00
parent 41c7634b75
commit a213b1593a
11 changed files with 363 additions and 6 deletions

29
app/e2e/helpers.js Normal file
View File

@@ -0,0 +1,29 @@
/**
* Shared Detox helpers for e2e tests.
*/
/**
* Wait for the app to pass the 5-second landing splash and reach MainTabs.
* Call this in beforeAll() after device.launchApp().
*/
async function navigatePastSplash() {
// 1. Splash logo must appear first
await waitFor(element(by.id('landing-logo')))
.toBeVisible()
.withTimeout(10000);
// 2. After the 5-second timer, the app navigates to MainTabs.
// The bottom tab label "Modèles" is the first visible tab bar item.
await waitFor(element(by.text('Modèles')))
.toBeVisible()
.withTimeout(12000);
}
/**
* Tap a bottom tab by its visible label.
*/
async function tapTab(label) {
await element(by.text(label)).tap();
}
module.exports = { navigatePastSplash, tapTab };