feat: 移除 H5 URL 中的品牌参数和缓存参数;更新测试用例以反映更改
This commit is contained in:
@@ -11,7 +11,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('loads the configured H5 root URL with shell launch params', () {
|
||||
test('loads the configured H5 root URL without shell URL params', () {
|
||||
const logo = 'data:image/png;base64,abc+/=';
|
||||
|
||||
final uri = Uri.parse(
|
||||
@@ -21,10 +21,10 @@ void main() {
|
||||
expect(uri.scheme, 'https');
|
||||
expect(uri.host, 'h5-im.imharry.work');
|
||||
expect(uri.path, '/');
|
||||
expect(uri.queryParameters['flutter_shell'], '1');
|
||||
expect(uri.queryParameters.containsKey('flutter_shell'), isFalse);
|
||||
expect(uri.queryParameters.containsKey('shell_app_name'), isFalse);
|
||||
expect(uri.queryParameters.containsKey('shell_app_logo'), isFalse);
|
||||
expect(uri.queryParameters['shell_cache_bust'], isNotEmpty);
|
||||
expect(uri.queryParameters.containsKey('shell_cache_bust'), isFalse);
|
||||
expect(uri.toString(), isNot(contains('%25')));
|
||||
expect(Uri.splitQueryString(uri.fragment).containsKey('shell_app_logo'),
|
||||
isFalse);
|
||||
@@ -34,16 +34,16 @@ void main() {
|
||||
final uri = Uri.parse(
|
||||
AppConfig.withFreshShellParams(
|
||||
'https://h5-im.imharry.work/login?from=runtime&shell_app_name=Old'
|
||||
'#shell_app_logo=old',
|
||||
'&flutter_shell=1&shell_cache_bust=1#shell_app_logo=old',
|
||||
),
|
||||
);
|
||||
|
||||
expect(uri.path, '/login');
|
||||
expect(uri.queryParameters['from'], 'runtime');
|
||||
expect(uri.queryParameters['flutter_shell'], '1');
|
||||
expect(uri.queryParameters.containsKey('flutter_shell'), isFalse);
|
||||
expect(uri.queryParameters.containsKey('shell_app_name'), isFalse);
|
||||
expect(uri.queryParameters.containsKey('shell_app_logo'), isFalse);
|
||||
expect(uri.queryParameters['shell_cache_bust'], isNotEmpty);
|
||||
expect(uri.queryParameters.containsKey('shell_cache_bust'), isFalse);
|
||||
expect(Uri.splitQueryString(uri.fragment).containsKey('shell_app_logo'),
|
||||
isFalse);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user