This commit is contained in:
parent
8793f9736a
commit
bab4d3d208
27 changed files with 401 additions and 175 deletions
|
@ -33,7 +33,7 @@ test('Bulk Edit Form displays correctly with drink types', function (): void {
|
|||
$this->assertResponseIsSuccessful();
|
||||
|
||||
// Check page title
|
||||
$this->assertSelectorTextContains('h1', 'Bulk Edit Drink Type Current Stock');
|
||||
$this->assertSelectorTextContains('h1', 'BULK EDIT DRINK TYPE CURRENT STOCK');
|
||||
|
||||
// Check that drink types are displayed in the table (they're in the value attribute of disabled inputs)
|
||||
$this->assertSelectorExists('input[value="Cola"]');
|
||||
|
@ -119,7 +119,7 @@ test('Bulk Edit Form handles empty drink types list', function (): void {
|
|||
$this->assertResponseIsSuccessful();
|
||||
|
||||
// Check page title
|
||||
$this->assertSelectorTextContains('h1', 'Bulk Edit Drink Type Current Stock');
|
||||
$this->assertSelectorTextContains('h1', 'BULK EDIT DRINK TYPE CURRENT STOCK');
|
||||
|
||||
// Check that the table exists but has no rows (no tbody content)
|
||||
$this->assertSelectorExists('table');
|
||||
|
@ -155,7 +155,7 @@ test('Bulk Edit Form rejects negative values (validation)', function (): void {
|
|||
|
||||
// The form should NOT redirect, but show the validation error
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertSelectorTextContains('h1', 'Bulk Edit Drink Type Current Stock');
|
||||
$this->assertSelectorTextContains('h1', 'BULK EDIT DRINK TYPE CURRENT STOCK');
|
||||
$this->assertSelectorTextContains('.form-error-message, .invalid-feedback', 'Current stock must not be negative');
|
||||
|
||||
// Verify the database was not updated
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue