emojis
This commit is contained in:
parent
f0c738362a
commit
476f91f7cf
27 changed files with 401 additions and 174 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
|
||||
|
|
|
@ -33,7 +33,7 @@ test('Bulk Edit Wanted Stock Form displays correctly with drink types', function
|
|||
$this->assertResponseIsSuccessful();
|
||||
|
||||
// Check page title
|
||||
$this->assertSelectorTextContains('h1', 'Bulk Edit Drink Type Wanted Stock');
|
||||
$this->assertSelectorTextContains('h1', 'BULK EDIT DRINK TYPE WANTED 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 Wanted Stock Form handles empty drink types list', function ():
|
|||
$this->assertResponseIsSuccessful();
|
||||
|
||||
// Check page title
|
||||
$this->assertSelectorTextContains('h1', 'Bulk Edit Drink Type Wanted Stock');
|
||||
$this->assertSelectorTextContains('h1', 'BULK EDIT DRINK TYPE WANTED STOCK');
|
||||
|
||||
// Check that the table exists but has no rows (no tbody content)
|
||||
$this->assertSelectorExists('table');
|
||||
|
@ -155,7 +155,7 @@ test('Bulk Edit Wanted Stock Form rejects negative values (validation)', functio
|
|||
|
||||
// The form should NOT redirect, but show the validation error
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertSelectorTextContains('h1', 'Bulk Edit Drink Type Wanted Stock');
|
||||
$this->assertSelectorTextContains('h1', 'BULK EDIT DRINK TYPE WANTED STOCK');
|
||||
$this->assertSelectorTextContains('.form-error-message, .invalid-feedback', 'Wanted stock must not be negative');
|
||||
|
||||
// Verify the database was not updated
|
||||
|
|
|
@ -14,5 +14,5 @@ test('Hello World', function (): void {
|
|||
|
||||
// Validate a successful response and some content
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertSelectorTextContains('h1', 'Drink Inventory');
|
||||
$this->assertSelectorTextContains('h1', 'DRINK INVENTORY');
|
||||
});
|
||||
|
|
|
@ -27,7 +27,7 @@ test('System Config index page displays all configurations', function (): void {
|
|||
$this->assertResponseIsSuccessful();
|
||||
|
||||
// Check page title
|
||||
$this->assertSelectorTextContains('h1', 'System Settings');
|
||||
$this->assertSelectorTextContains('h1', 'SYSTEM SETTINGS');
|
||||
|
||||
// Check that all system configs are displayed
|
||||
foreach (SystemSettingKey::cases() as $key) {
|
||||
|
@ -55,7 +55,7 @@ test('System Config edit page displays form correctly', function (): void {
|
|||
$this->assertResponseIsSuccessful();
|
||||
|
||||
// Check page title
|
||||
$this->assertSelectorTextContains('h1', 'Edit System Setting: ' . $config->getKey()->name);
|
||||
$this->assertSelectorTextContains('h1', 'EDIT SYSTEM SETTING');
|
||||
|
||||
// Check that the form exists with the current value
|
||||
$this->assertSelectorExists('form[name="system_config_form"]');
|
||||
|
@ -90,7 +90,7 @@ test('System Config edit form submission updates configuration', function (): vo
|
|||
$crawler = $client->request('GET', "/system-config/{$config->getId()}/edit");
|
||||
|
||||
// Submit the form with updated value
|
||||
$form = $crawler->selectButton('Update')->form();
|
||||
$form = $crawler->filter('form[name="system_config_form"]')->form();
|
||||
$form['system_config_form[value]'] = $newValue;
|
||||
|
||||
$client->submit($form);
|
||||
|
@ -166,7 +166,7 @@ test('System Config edit form rejects empty values', function (): void {
|
|||
$crawler = $client->request('GET', "/system-config/{$config->getId()}/edit");
|
||||
|
||||
// Submit the form with an empty value
|
||||
$form = $crawler->selectButton('Update')->form();
|
||||
$form = $crawler->filter('form[name="system_config_form"]')->form();
|
||||
$form['system_config_form[value]'] = '';
|
||||
|
||||
$client->submit($form);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue