fix:对齐金值,主要注销,一键登录等方面修改
This commit is contained in:
1 parent
e29ed0a2c8
commit
6997a65c96
37 files changed
+3442
-514
No files matched your search
@@ -2,6 +2,7 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:jinzhi_flutter_app/features/mall/application/mall_tab_config.dart';
|
||||
import 'package:jinzhi_flutter_app/models/pb/jinzhi/v1/ads.pb.dart' as pb;
|
||||
|
||||
void main() {
|
||||
test('builds the resident mall URL with Jinzhi attribution and theme', () {
|
||||
@@ -102,6 +103,27 @@ void main() {
|
||||
expect(config.entryTipTitle, '新人礼:¥360 铂金订购券');
|
||||
expect(config.entryTipBody, '点击这里进商城');
|
||||
});
|
||||
|
||||
test('parses generated mall promotion and open-mode fields', () {
|
||||
final response = pb.GetAdReply(
|
||||
enabled: true,
|
||||
ad: pb.AdCreative(
|
||||
adId: 'ad-1',
|
||||
title: '会员商城',
|
||||
h5Url: 'https://mall.example.com',
|
||||
trackingId: 'tracking-1',
|
||||
openMode: pb.AdOpenMode.AD_OPEN_MODE_NATIVE_APP,
|
||||
mallPromotion: pb.MallPromotion(quoteCtaEnabled: true),
|
||||
),
|
||||
);
|
||||
|
||||
final config = parseMallTabConfigResponse(response.writeToBuffer());
|
||||
|
||||
expect(config.isVisible, isTrue);
|
||||
expect(config.openMode, 'native_app');
|
||||
expect(config.quoteCtaEnabled, isTrue);
|
||||
expect(config.allowedHosts, {'mall.example.com'});
|
||||
});
|
||||
}
|
||||
|
||||
List<int> _stringField(int tag, String value) =>
|
||||
|
||||
Reference in new issue
Block a user