diff --git a/.github/workflows/react-native-sdk-e2e.yml b/.github/workflows/react-native-sdk-e2e.yml new file mode 100644 index 0000000..bade802 --- /dev/null +++ b/.github/workflows/react-native-sdk-e2e.yml @@ -0,0 +1,18 @@ +# Runs React Native SDK E2E tests from e2e-system-tests on every PR. +# The check runs in the e2e-system-tests repo and reports back here; merge is blocked until it passes. +# Require this check in branch protection: Settings → Branches → rule → "React Native SDK E2E". + +name: React Native SDK E2E + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + react-native-sdk-e2e: + name: React Native SDK E2E + uses: frontegg/e2e-system-tests/.github/workflows/react-native-sdk-e2e-reusable.yml@main + with: + repo_ref: ${{ github.event.pull_request.head.sha }} + test_suite: hosted:no-social + secrets: inherit diff --git a/docs/E2E_REACT_NATIVE_TESTS_REVIEW.md b/docs/E2E_REACT_NATIVE_TESTS_REVIEW.md new file mode 100644 index 0000000..620545d --- /dev/null +++ b/docs/E2E_REACT_NATIVE_TESTS_REVIEW.md @@ -0,0 +1,120 @@ +# Review: React Native E2E Tests (e2e-system-tests/mobile-sdk) + +This document reviews the React Native tests in the **e2e-system-tests** repo (`mobile-sdk/nightwatch/mobile-app-tests/react-native-sdk/`) against the **frontegg-react-native** SDK and its example app. + +--- + +## 1. Overview + +| Item | Location / Details | +|------|-------------------| +| **E2E repo** | `e2e-system-tests/mobile-sdk` | +| **App under test** | `frontegg-react-native/example` (iOS & Android) | +| **Framework** | Nightwatch.js + Appium | +| **Environments** | `app.ios.react-native-sdk.hosted`, `app.android.react-native-sdk.hosted` | + +The tests assume the example app is built from `frontegg-react-native/example` and that the e2e repo can resolve the app binary via relative paths (`../../frontegg-react-native`, `../frontegg-react-native`, or `frontegg-react-native` from cwd). + +--- + +## 2. Credentials Alignment + +- **E2E auth-utils** (`auth-utils.ts`) uses: + - `clientId`: `5f493de4-01c5-4a61-8642-fca650a6a9dc` + - `serviceGateway`: `https://app-x4gr8g28fxr5.frontegg.com` +- **Example app** (after your recent change) uses the same: + - iOS: `Frontegg.plist` — `baseUrl`, `clientId` + - Android: `build.gradle` — `fronteggDomain`, `fronteggClientId` + +So the e2e suite and the example app are aligned on the same Frontegg app. No change needed in e2e for credentials. + +--- + +## 3. Page Object & Selectors vs Example App + +### 3.1 Start page (unauthenticated) + +| E2E selector | Example app (HomeScreen) | Notes | +|--------------|-------------------------|--------| +| Login button: `@name="Login"` (iOS) / `@text="Login"` (Android) | `