major ui updates

This commit is contained in:
Mark Gregory
2026-06-12 15:11:51 +01:00
parent 3c9b39d83b
commit 7bc8f20ed5
154 changed files with 3796 additions and 4117 deletions
@@ -84,10 +84,10 @@ trait InteractsWithWmsData
protected function seedPlatformPrices(): void
{
foreach ([
['basic', 'Basic', 'Starter WMS access', 'Core warehouse management for small teams.', 4900, 49000, 10, false, true, ['2 warehouses', '10 users', 'Standard support']],
['advanced', 'Advanced', 'Growing WMS operations', 'More users, warehouses and automation controls.', 14900, 149000, 20, true, true, ['5 warehouses', '100 users', 'Advanced support']],
['pro', 'Pro', 'Professional WMS command centre', 'Full operational visibility for larger teams.', 29900, 299000, 30, false, true, ['15 warehouses', '1000 users', 'Priority support']],
] as [$code, $name, $strapline, $description, $monthly, $annual, $sortOrder, $featured, $active, $features]) {
['basic', 'Basic', 'Starter WMS access', 'Core warehouse management for small teams.', 4900, 49000, 10, false, true, ['2 warehouses', '10 users', 'Standard support']],
['advanced', 'Advanced', 'Growing WMS operations', 'More users, warehouses and automation controls.', 14900, 149000, 20, true, true, ['5 warehouses', '100 users', 'Advanced support']],
['pro', 'Pro', 'Professional WMS command centre', 'Full operational visibility for larger teams.', 29900, 299000, 30, false, true, ['15 warehouses', '1000 users', 'Priority support']],
] as [$code, $name, $strapline, $description, $monthly, $annual, $sortOrder, $featured, $active, $features]) {
PlatformPrice::query()->updateOrCreate(
['code' => $code],
[
@@ -4,9 +4,6 @@ namespace Tests\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Browser;
use Modules\Platform\app\Models\Company;
use Modules\Platform\app\Models\LicenseKey;
use Modules\Platform\app\Models\Payment;
use Tests\Browser\Concerns\InteractsWithWmsBrowser;
use Tests\Browser\Concerns\InteractsWithWmsData;
use Tests\DuskTestCase;
+1 -1
View File
@@ -63,7 +63,7 @@ class PlatformPricingBrowserTest extends DuskTestCase
$this->assertSingleProfessionalHeader($browser, '');
$browser->assertPresent('input[name="name"]')
->assertPresent('input[name="monthly_amount"]')
->visit('/admin/prices/' . $price->id . '/edit');
->visit('/admin/prices/'.$price->id.'/edit');
$this->assertSingleProfessionalHeaderExists($browser);
$browser->assertPresent('input[name="name"]')
@@ -46,7 +46,7 @@ class InternalApiCoverageTest extends TestCase
{
config(['platform.internal_api_key' => 'testing-secret']);
$timestamp = now()->subMinutes(10)->toIso8601String();
$signature = hash_hmac('sha256', $timestamp . '.', 'testing-secret');
$signature = hash_hmac('sha256', $timestamp.'.', 'testing-secret');
$this->withHeaders([
'X-WMS-Timestamp' => $timestamp,
@@ -64,7 +64,7 @@ class InternalApiCoverageTest extends TestCase
$this->withHeaders([
'X-WMS-Timestamp' => $timestamp,
'X-WMS-Signature' => hash_hmac('sha256', $timestamp . '.', 'wrong-secret'),
'X-WMS-Signature' => hash_hmac('sha256', $timestamp.'.', 'wrong-secret'),
])->getJson('/api/internal/companies')->assertUnauthorized();
}
@@ -81,7 +81,7 @@ class InternalApiCoverageTest extends TestCase
Warehouse::create(['company_id' => $company->id, 'code' => 'SUM', 'name' => 'Summary Warehouse']);
$timestamp = now()->toIso8601String();
$signature = hash_hmac('sha256', $timestamp . '.', 'testing-secret');
$signature = hash_hmac('sha256', $timestamp.'.', 'testing-secret');
$this->withHeaders([
'X-WMS-Timestamp' => $timestamp,
@@ -241,7 +241,7 @@ class PlatformAdministrationTest extends TestCase
}
/**
* @param array<string, mixed> $overrides
* @param array<string, mixed> $overrides
* @return array<string, mixed>
*/
private function pricePayload(array $overrides = []): array
@@ -266,7 +266,7 @@ class PlatformAdministrationTest extends TestCase
/**
* Return payload with a valid test CSRF token.
*
* @param array<string, mixed> $payload
* @param array<string, mixed> $payload
* @return array<string, mixed>
*/
private function csrfPayload(array $payload = []): array
@@ -4,7 +4,6 @@ namespace Tests\Feature\Platform;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Modules\Platform\app\Models\Company;
use Modules\Platform\app\Models\PlatformPrice;
use PHPUnit\Framework\Attributes\DataProvider;
use Tests\TestCase;
@@ -256,7 +255,7 @@ class PlatformPriceCrudTest extends TestCase
}
/**
* @param array<string, mixed> $overrides
* @param array<string, mixed> $overrides
* @return array<string, mixed>
*/
private function pricePayload(array $overrides = []): array
@@ -302,7 +301,7 @@ class PlatformPriceCrudTest extends TestCase
/**
* Return payload with a valid test CSRF token.
*
* @param array<string, mixed> $payload
* @param array<string, mixed> $payload
* @return array<string, mixed>
*/
private function csrfPayload(array $payload = []): array
@@ -205,7 +205,7 @@ class WarehouseCrudTest extends TestCase
/**
* Return payload with a valid test CSRF token.
*
* @param array<string, mixed> $payload
* @param array<string, mixed> $payload
* @return array<string, mixed>
*/
private function csrfPayload(array $payload = []): array
+3 -2
View File
@@ -4,6 +4,7 @@ namespace Tests;
use Illuminate\Foundation\Http\Middleware\ValidateCsrfToken;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Testing\TestResponse;
use Laravel\Fortify\Features;
abstract class TestCase extends BaseTestCase
@@ -25,9 +26,9 @@ abstract class TestCase extends BaseTestCase
/**
* POST with a real CSRF token for Fortify/web form tests.
*
* @param array<string, mixed> $data
* @param array<string, mixed> $data
*/
protected function csrfPost(string $uri, array $data = []): \Illuminate\Testing\TestResponse
protected function csrfPost(string $uri, array $data = []): TestResponse
{
$token = 'test-csrf-token';