feat: add end-to-end tests for Agents, Chat, Navigation, and Settings screens
This commit is contained in:
29
app/e2e/helpers.js
Normal file
29
app/e2e/helpers.js
Normal 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 };
|
||||
Reference in New Issue
Block a user