Skip to content
Snippets Groups Projects

Enabled Gitlab CI

Merged Shekhar Verma requested to merge issue/builder_notes-3421571:3421571-Fix-Gitlab-CI into 2.x
Files
4
@@ -38,9 +38,15 @@ class BuilderNotesTest extends BrowserTestBase {
@@ -38,9 +38,15 @@ class BuilderNotesTest extends BrowserTestBase {
'responsive_image_test_module',
'responsive_image_test_module',
];
];
 
/**
 
* {@inheritdoc}
 
*/
protected $defaultTheme = 'stark';
protected $defaultTheme = 'stark';
public function testBuilderNotesUI() {
/**
 
* Tests the module.
 
*/
 
public function testBuilderNotesUi() {
$this->placeBlock('system_breadcrumb_block');
$this->placeBlock('system_breadcrumb_block');
$this->drupalLogin($this->drupalCreateUser([
$this->drupalLogin($this->drupalCreateUser([
'administer content types',
'administer content types',
@@ -58,7 +64,7 @@ class BuilderNotesTest extends BrowserTestBase {
@@ -58,7 +64,7 @@ class BuilderNotesTest extends BrowserTestBase {
$this->createRole([], 'editors', 'Editors');
$this->createRole([], 'editors', 'Editors');
$this->drupalGet('admin/structure/types/manage/page');
$this->drupalGet('admin/structure/types/manage/page');
$notes = 'I am going to use this content type for pages';
$notes = 'I am going to use this content type for pages';
$this->assertNotesField($notes, 'Save content type', 'admin/structure/types/manage/page');
$this->assertNotesField($notes, 'Save', 'admin/structure/types/manage/page');
$entityTypeManager = $this->container->get('entity_type.manager');
$entityTypeManager = $this->container->get('entity_type.manager');
$node_type = $entityTypeManager->getStorage('node_type')->load('page');
$node_type = $entityTypeManager->getStorage('node_type')->load('page');
$this->assertNotesSaved($notes, $node_type);
$this->assertNotesSaved($notes, $node_type);
@@ -74,15 +80,12 @@ class BuilderNotesTest extends BrowserTestBase {
@@ -74,15 +80,12 @@ class BuilderNotesTest extends BrowserTestBase {
/** @var \Drupal\Core\Entity\Entity\EntityViewDisplay $view_display */
/** @var \Drupal\Core\Entity\Entity\EntityViewDisplay $view_display */
$view_display = $entityTypeManager->getStorage('entity_view_display')->load('node.page.default');
$view_display = $entityTypeManager->getStorage('entity_view_display')->load('node.page.default');
$this->assertNotesSaved($notes, $view_display);
$this->assertNotesSaved($notes, $view_display);
$storage_notes = 'This field is used for the subtitle';
$field_notes = 'This field is not to be reused';
$field_notes = 'This field is not to be reused';
$this->fieldUIAddNewField('admin/structure/types/manage/page', 'text', 'Text', 'text', [
$this->fieldUIAddNewField('admin/structure/types/manage/page', 'text', 'Text', 'text');
'builder_notes' => $storage_notes,
$this->drupalGet('admin/structure/types/manage/page/fields/node.page.field_text');
], [
$this->submitForm([
'builder_notes' => $field_notes,
'builder_notes' => $field_notes,
]);
], 'Save settings');
$storage = $entityTypeManager->getStorage('field_storage_config')->load('node.field_text');
$this->assertNotesSaved($storage_notes, $storage);
$field = $entityTypeManager->getStorage('field_config')->load('node.page.field_text');
$field = $entityTypeManager->getStorage('field_config')->load('node.page.field_text');
$this->assertNotesSaved($field_notes, $field);
$this->assertNotesSaved($field_notes, $field);
$roleStorage = $entityTypeManager->getStorage('user_role');
$roleStorage = $entityTypeManager->getStorage('user_role');
@@ -116,7 +119,7 @@ class BuilderNotesTest extends BrowserTestBase {
@@ -116,7 +119,7 @@ class BuilderNotesTest extends BrowserTestBase {
* Notes to use.
* Notes to use.
* @param string $button_text
* @param string $button_text
* Button text.
* Button text.
* @param string|NULL $redirect
* @param string|null $redirect_path
* Redirect path.
* Redirect path.
*/
*/
protected function assertNotesField($notes, $button_text = 'Save', $redirect_path = NULL) {
protected function assertNotesField($notes, $button_text = 'Save', $redirect_path = NULL) {
Loading