feat: 添加登录页面 URL 检测功能;更新 H5ShellPage 状态管理以支持路由变化
This commit is contained in:
@@ -50,6 +50,20 @@ void main() {
|
||||
expect(AppConfig.lineIndexForUrl('${lineUrl}login'), 0);
|
||||
});
|
||||
|
||||
test('detects only H5 login routes for shell line switch display', () {
|
||||
expect(
|
||||
AppConfig.isLoginPageUrl('https://h5-test.imharry.work/login'), isTrue);
|
||||
expect(AppConfig.isLoginPageUrl('https://h5-test.imharry.work/app/login'),
|
||||
isTrue);
|
||||
expect(AppConfig.isLoginPageUrl('https://h5-test.imharry.work/#/login'),
|
||||
isTrue);
|
||||
expect(AppConfig.isLoginPageUrl('https://h5-test.imharry.work/'), isFalse);
|
||||
expect(AppConfig.isLoginPageUrl('https://h5-test.imharry.work/contact'),
|
||||
isFalse);
|
||||
expect(AppConfig.isLoginPageUrl('https://h5-test.imharry.work/getCode'),
|
||||
isFalse);
|
||||
});
|
||||
|
||||
test('refreshes an H5 route URL without adding branding to the URL', () {
|
||||
final uri = Uri.parse(
|
||||
AppConfig.withFreshShellParams(
|
||||
|
||||
Reference in New Issue
Block a user