fix: ios 16

This commit is contained in:
hashbro
2026-08-09 21:57:08 +08:00
parent 6bf33e2761
commit 6bc172c570
179 changed files with 6246 additions and 400 deletions
+14 -7
View File
@@ -41,7 +41,7 @@ class AdminAgentPortalTest extends TestCase
$this->assertDatabaseHas('users', ['username' => 'agent1']);
$this->assertDatabaseHas('channels', ['channel_id' => $channel->channel_id, 'user_id' => $user->id]);
$this->assertSame(
['https://cdn.example.com/channel/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/web/support.html'],
['https://cdn.example.com/web/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/support.html'],
$channel->supportLinks()
);
}
@@ -90,11 +90,18 @@ class AdminAgentPortalTest extends TestCase
$admin = Admin::query()->create(['username' => 'admin', 'password' => 'admin123']);
$projects = Mockery::mock(ChannelProjectService::class);
$projects->shouldReceive('generate')->once()->with(
Mockery::type('string'),
Mockery::type('array'),
Mockery::any()
);
$projects->shouldReceive('generate')->once()->andReturn([
'channel_id' => 'placeholder',
'seeds' => [
'deployment_seed' => '11111111111111111111111111111111',
'reporting_seed' => '11111111111111111111111111111111',
],
'domains' => ['deployment' => [], 'reporting' => []],
'seeds_initialized' => false,
'sync_rebuilt' => false,
'support_path' => '/web/x/support.html',
'daily_path' => '/sync/daily.html',
]);
$this->app->instance(ChannelProjectService::class, $projects);
$random = $this->actingAs($admin, 'admin')
@@ -117,7 +124,7 @@ class AdminAgentPortalTest extends TestCase
])
->assertOk()
->assertJsonPath('code', 0)
->assertJsonPath('data.links.0', 'https://fallback.test/channel/'.$channelId.'/web/support.html');
->assertJsonPath('data.links.0', 'https://fallback.test/web/'.$channelId.'/support.html');
$this->assertDatabaseHas('channels', [
'channel_id' => $channelId,