refactor(js): tempButtonFeedback提升为通用并前置于run_id复制处理
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminJsTempButtonFeedbackShouldBeDefinedBeforeCopyRunIdHandlerTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_temp_button_feedback_should_be_defined_before_copy_run_id_handler(): void
|
||||
{
|
||||
$js = file_get_contents(public_path('js/admin.js'));
|
||||
$this->assertIsString($js);
|
||||
|
||||
$posTemp = strpos($js, 'function tempButtonFeedback');
|
||||
$posRunId = strpos($js, 'copy-run-id');
|
||||
|
||||
$this->assertNotFalse($posTemp);
|
||||
$this->assertNotFalse($posRunId);
|
||||
|
||||
$this->assertTrue($posTemp < $posRunId, 'tempButtonFeedback should be defined before copy-run-id handler');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user