Prep v1.111.0 e2e (#9494)

* Add e2e debug support for AA

* Remove dup tap call

* Update dev-env
This commit is contained in:
Eric Bailey
2025-12-05 16:34:08 -06:00
committed by GitHub
parent c68e5e82af
commit d16c8aedfb
6 changed files with 273 additions and 316 deletions
+7 -27
View File
@@ -5,10 +5,10 @@ import {
} from '@atproto/api'
import {type OtherRequiredData} from '#/ageAssurance/data'
import {IS_DEV} from '#/env'
import {IS_DEV, IS_E2E} from '#/env'
import {type Geolocation} from '#/geolocation'
export const enabled = IS_DEV && false
export const enabled = (IS_DEV && false) || IS_E2E
export const geolocation: Geolocation | undefined = enabled
? {
@@ -30,29 +30,9 @@ export const config: AppBskyAgeassuranceDefs.Config = {
countryCode: 'AA',
regionCode: undefined,
rules: [
{
$type: ids.IfAccountNewerThan,
date: '2025-12-01T00:00:00Z',
access: 'none',
},
{
$type: ids.IfAssuredOverAge,
age: 18,
access: 'full',
},
{
$type: ids.IfAssuredOverAge,
age: 16,
access: 'safe',
},
{
$type: ids.IfDeclaredUnderAge,
age: 16,
access: 'none',
},
{
$type: ids.Default,
access: 'safe',
access: 'full',
},
],
},
@@ -68,17 +48,17 @@ export const serverState: AppBskyAgeassuranceGetState.OutputSchema | undefined =
serverStateEnabled
? {
state: {
lastInitiatedAt: new Date(2023, 5, 1).toISOString(),
lastInitiatedAt: new Date(2025, 1, 1).toISOString(),
status: 'assured',
access: 'safe',
access: 'full',
},
metadata: {
accountCreatedAt: new Date(2023, 11, 1).toISOString(),
accountCreatedAt: new Date(2023, 1, 1).toISOString(),
},
}
: undefined
export async function resolve<T>(data: T) {
await new Promise(y => setTimeout(y, 2000)) // simulate network
await new Promise(y => setTimeout(y, 500)) // simulate network
return data
}
+5
View File
@@ -30,6 +30,11 @@ export const IS_TESTFLIGHT = ENV === 'testflight'
*/
export const IS_DEV = __DEV__
/**
* Indicates whether the app is running in a test environment
*/
export const IS_E2E = ENV === 'e2e'
/**
* Indicates whether the app is `__DEV__` or TestFlight
*/
+1 -1
View File
@@ -14,6 +14,6 @@ export const deviceGeolocation: Geolocation = aaDebug.deviceGeolocation ?? {
}
export async function resolve<T>(data: T) {
await new Promise(y => setTimeout(y, 2000)) // simulate network
await new Promise(y => setTimeout(y, 500)) // simulate network
return data
}