- admin registration fixes

- alert popup refactoring
This commit is contained in:
Čarodej
2022-03-17 12:31:09 +01:00
parent e8f59ef0a9
commit 01588fa06b
41 changed files with 288 additions and 300 deletions

View File

@@ -121,46 +121,10 @@ class AdminTest extends TestCase
->actingAs($admin)
->getJson("/api/admin/users/$user->id/storage")
->assertStatus(200)
->assertExactJson([
'data' => [
'id' => $user->id,
'type' => 'storage',
'attributes' => [
'used' => '5.00MB',
'capacity' => '1GB',
'percentage' => 0.5,
],
'meta' => [
'images' => [
'used' => '1.00MB',
'percentage' => 0.1,
],
'audios' => [
'used' => '1.00MB',
'percentage' => 0.1,
],
'videos' => [
'used' => '1.00MB',
'percentage' => 0.1,
],
'documents' => [
'used' => '1.00MB',
'percentage' => 0.1,
],
'others' => [
'used' => '1.00MB',
'percentage' => 0.1,
],
'traffic' => [
'chart' => [
'download' => [],
'upload' => [],
],
'download' => '0B',
'upload' => '0B',
],
],
],
->assertJsonFragment([
'used' => '5.00MB',
'capacity' => '1GB',
'percentage' => 0.5,
]);
}

View File

@@ -23,28 +23,18 @@ class DashboardTest extends TestCase
->actingAs($user)
->getJson('/api/admin/dashboard')
->assertStatus(200)
->assertExactJson([
->assertJsonFragment([
'app' => [
'earnings' => '$0.00',
'isRunningCron' => false,
'license' => 'extended',
'version' => config('vuefilemanager.version'),
],
'disk' => [
'download' => [
'records' => [],
'total' => '0B',
],
'upload' => [
'records' => [],
'total' => '0B',
],
'used' => '2.00MB',
],
'users' => [
'total' => 1,
'usersPremiumTotal' => 0,
],
'used' => '2.00MB',
]);
}