- 同步商城 H5 登录态与原生 token - 完善商城/原生 tab 切换、动画及返回交互 - 修复七鱼客服键盘避让和状态栏恢复 - 调整开屏跳过按钮与登录入口交互
35 lines
1.2 KiB
Dart
35 lines
1.2 KiB
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:jinzhi_flutter_app/features/mall/application/mall_tab_config.dart';
|
|
|
|
void main() {
|
|
test('preserves Jinzhi attribution while syncing H5 login', () {
|
|
final arguments = buildEnterWebMallBridgeArguments(
|
|
currentUri: Uri.parse(
|
|
'https://mall.example.com/?from=jinzhi&source_app=jinzhi'
|
|
'&source_entry=mall_tab&placement=mall_tab&hook_type=mall_tab'
|
|
'&tracking_id=tracking&click_id=click-1&ts=123&isNight=0',
|
|
),
|
|
logged: true,
|
|
isDark: true,
|
|
authToken: 'mall-token',
|
|
scene: 'web_mall',
|
|
sourceApp: 'jinzhi',
|
|
attribution: const MallClickAttribution(
|
|
adId: 'latest-ad',
|
|
trackingId: 'latest-tracking',
|
|
clickId: 'latest-click',
|
|
),
|
|
);
|
|
|
|
expect(arguments['from'], 'jinzhi');
|
|
expect(arguments['source_app'], 'jinzhi');
|
|
expect(arguments['ad_id'], 'latest-ad');
|
|
expect(arguments['tracking_id'], 'latest-tracking');
|
|
expect(arguments['click_id'], 'latest-click');
|
|
expect(arguments['isNight'], '1');
|
|
expect(arguments['auth_token'], 'mall-token');
|
|
expect(arguments['authToken'], 'mall-token');
|
|
expect(arguments['scene'], 'web_mall');
|
|
});
|
|
}
|