Tests: ensure clear BMPA errors button disables when sync_status/synced_only present
This commit is contained in:
@@ -90,4 +90,36 @@ class AdminPlatformOrderIndexClearErrorButtonsShouldDisableWhenNotInFailedScopeT
|
||||
|
||||
$this->assertTrue(str_contains($html, 'type="submit" disabled') || str_contains($html, 'disabled="disabled"'));
|
||||
}
|
||||
|
||||
public function test_clear_bmpa_errors_button_should_disable_when_sync_status_filter_present_even_if_in_bmpa_failed_scope(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin/platform-orders?bmpa_failed_only=1&sync_status=failed');
|
||||
$res->assertOk();
|
||||
|
||||
$html = (string) $res->getContent();
|
||||
|
||||
$this->assertStringContainsString('清除批量标记支付失败标记(当前筛选范围)', $html);
|
||||
$this->assertStringContainsString('data-role="clear-bmpa-errors-blocked-hint"', $html);
|
||||
$this->assertStringContainsString('同步状态', $html);
|
||||
|
||||
$this->assertTrue(str_contains($html, 'type="submit" disabled') || str_contains($html, 'disabled="disabled"'));
|
||||
}
|
||||
|
||||
public function test_clear_bmpa_errors_button_should_disable_when_synced_only_filter_present_even_if_in_bmpa_failed_scope(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin/platform-orders?bmpa_failed_only=1&synced_only=1');
|
||||
$res->assertOk();
|
||||
|
||||
$html = (string) $res->getContent();
|
||||
|
||||
$this->assertStringContainsString('清除批量标记支付失败标记(当前筛选范围)', $html);
|
||||
$this->assertStringContainsString('data-role="clear-bmpa-errors-blocked-hint"', $html);
|
||||
$this->assertStringContainsString('已同步', $html);
|
||||
|
||||
$this->assertTrue(str_contains($html, 'type="submit" disabled') || str_contains($html, 'disabled="disabled"'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user