Refactor PVC models and update tests
- Updated the PVC models in the database and adjusted the tests accordingly to reflect the new model counts and codes. - Removed deprecated models from the JSON data for PVC systems. - Added new GLB models for "scorrevole_sf_3_ante" and "scorrevole_sf_4_ante". - Enhanced the development scripts to streamline the build process for both frontends. - Updated documentation to reflect changes in the development environment and deployment process. - Improved the styling of texture radio options for better visibility. - Fixed URL handling in the configurator to ensure proper routing and API calls.
This commit is contained in:
@@ -26,14 +26,14 @@ class CatalogoApiTest extends TestCase
|
||||
$this->seed(CatalogoSeeder::class);
|
||||
|
||||
$pvc = Sistema::where('codice', 'pvc')->firstOrFail();
|
||||
$this->assertSame(30, $pvc->modelli()->count());
|
||||
$this->assertSame(28, $pvc->modelli()->count());
|
||||
|
||||
$finestra = $pvc->modelli()->where('codice', 'finestra_1_anta')->firstOrFail();
|
||||
$this->assertSame('FINESTRA 1 ANTA, A/R', $finestra->descrizione);
|
||||
Storage::disk('public')->assertExists($finestra->icona);
|
||||
|
||||
// Modelli presenti solo nell'Excel: senza asset 3D, quindi disattivi.
|
||||
$this->assertFalse($pvc->modelli()->where('codice', 'scorrevole_sf_3_ante')->value('attivo'));
|
||||
$this->assertFalse($pvc->modelli()->where('codice', 'scorrevole_hst_4_ante')->value('attivo'));
|
||||
}
|
||||
|
||||
public function test_il_seeder_non_sovrascrive_le_modifiche_admin(): void
|
||||
@@ -44,7 +44,7 @@ class CatalogoApiTest extends TestCase
|
||||
$this->seed(CatalogoSeeder::class);
|
||||
|
||||
$this->assertSame('Bilico modificato', Modello::where('codice', 'bilico')->value('nome'));
|
||||
$this->assertSame(30, Modello::count());
|
||||
$this->assertSame(28, Modello::count());
|
||||
}
|
||||
|
||||
public function test_api_sistemi_espone_solo_modelli_attivi_e_con_listino_in_ordine(): void
|
||||
@@ -63,7 +63,7 @@ class CatalogoApiTest extends TestCase
|
||||
$this->assertSame(25, $modelli->count());
|
||||
$this->assertNotContains('bilico', $modelli->pluck('id'));
|
||||
$this->assertSame('finestra_1_anta', $modelli->first()['id']);
|
||||
$this->assertNotContains('scorrevole_sf_3_ante', $modelli->pluck('id'));
|
||||
$this->assertNotContains('scorrevole_hst_4_ante', $modelli->pluck('id'));
|
||||
$this->assertStringEndsWith('/storage/modelli/icone/pvc/finestra_1_anta.jpg', $modelli->first()['icona']);
|
||||
$this->assertSame('finestra_1_anta.glb', $modelli->first()['modello']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user