Skip to content
Snippets Groups Projects
Commit 21c99c4a authored by Pablo López's avatar Pablo López
Browse files

Apply suggestions.

parent dbb1ab2a
No related branches found
No related tags found
No related merge requests found
Pipeline #469191 failed
Pipeline: drupal-3509310

#469193

    ......@@ -91,10 +91,10 @@ public function buildForm(array $form, FormStateInterface $form_state, ?SectionS
    $form['#attached']['library'][] = 'navigation/navigation.layoutBuilder';
    $form['actions'] = [
    'enable_edition' => [
    'enable_edit_mode' => [
    '#type' => 'submit',
    '#value' => $this->t('Enable Edit mode'),
    '#name' => 'enable_edition',
    '#value' => $this->t('Enable edit mode'),
    '#name' => 'enable_edit_mode',
    '#ajax' => [
    'callback' => '::enableEditMode',
    'wrapper' => 'js-config-form-wrapper',
    ......@@ -152,8 +152,8 @@ protected function handleFormElementsVisibility(array &$form, bool $edit_mode_en
    $form['actions']['preview_toggle']['toggle_content_preview']['#access'] =
    $form['layout_builder']['#access'] = $edit_mode_enabled;
    // Edit mode flag element is onl visible when edit mode is disabled.
    $form['actions']['enable_edition']['#access'] = !$edit_mode_enabled;
    // Edit mode flag element is only visible when edit mode is disabled.
    $form['actions']['enable_edit_mode']['#access'] = !$edit_mode_enabled;
    return $form;
    }
    ......
    ......@@ -80,7 +80,7 @@ public function testNavigationBlockAdminUiPageNestedForm(): void {
    // Edit the layout and add a block that contains a form.
    $this->drupalGet($layout_url);
    $this->getSession()->getPage()->pressButton('Enable Edit mode');
    $this->getSession()->getPage()->pressButton('Enable edit mode');
    $this->assertSession()->assertWaitOnAjaxRequest();
    $this->openAddBlockForm('Layout Builder form block test form api form block');
    $this->getSession()->getPage()->checkField('settings[label_display]');
    ......@@ -100,7 +100,7 @@ public function testNavigationBlockAdminUiPageNestedForm(): void {
    // Try to save the layout again and confirm it can save because there are no
    // nested form tags.
    $this->drupalGet($layout_url);
    $this->getSession()->getPage()->pressButton('Enable Edit mode');
    $this->getSession()->getPage()->pressButton('Enable edit mode');
    $this->assertSession()->assertWaitOnAjaxRequest();
    $this->getSession()->getPage()->checkField('toggle_content_preview');
    $this->getSession()->getPage()->pressButton('Save');
    ......@@ -130,7 +130,7 @@ public function testNavigationBlockAdminUiPage(): void {
    $this->drupalLogin($this->adminUser);
    $this->drupalGet($layout_url);
    $page = $this->getSession()->getPage();
    $this->getSession()->getPage()->pressButton('Enable Edit mode');
    $this->getSession()->getPage()->pressButton('Enable edit mode');
    $this->assertSession()->assertWaitOnAjaxRequest();
    // Add section should not be present
    ......@@ -188,7 +188,7 @@ public function testNavigationBlockAdminUiPage(): void {
    // Reconfigure a block and ensure that the layout content is updated.
    $this->drupalGet($layout_url);
    $this->getSession()->getPage()->pressButton('Enable Edit mode');
    $this->getSession()->getPage()->pressButton('Enable edit mode');
    $this->assertSession()->assertWaitOnAjaxRequest();
    $this->clickContextualLink('.layout-builder .block-navigation-shortcuts', 'Configure');
    $this->assertOffCanvasFormAfterWait('layout_builder_update_block');
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment