public function AssetInjectorCssTest::testSaveContinue in Asset Injector 8.2
Tests if the save and continue button works accurately.
Throws
\Exception
File
- tests/
src/ Functional/ AssetInjectorCssTest.php, line 98
Class
- AssetInjectorCssTest
- Class AssetInjectorCssTest.
Namespace
Drupal\Tests\asset_injector\FunctionalCode
public function testSaveContinue() {
$page = $this
->getSession()
->getPage();
$this
->testCssPermissionGranted();
$this
->drupalGet('admin/config/development/asset-injector/css/add');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->pageTextContains($this
->t('Code'));
$page
->fillField('Label', 'test save continue');
$page
->fillField('Machine-readable name', 'test_save_continue');
$page
->fillField('Code', '.block{}');
$page
->pressButton('Save and Continue Editing');
$this
->assertSession()
->pageTextContains('Created the test save continue Asset Injector');
$this
->assertSession()
->addressEquals('admin/config/development/asset-injector/css/test_save_continue');
}