Skip to content

Commit

Permalink
HSD8-1077 Allow site managers ability to build unpublished menu items (
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish authored Jul 6, 2021
1 parent bc1b5b3 commit c201580
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 14 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@
"https://www.drupal.org/project/config_ignore/issues/2865419": "https://www.drupal.org/files/issues/2020-07-20/config_ignore-wildcard_force_import.patch"
},
"drupal/core": {
"https://www.drupal.org/project/drupal/issues/2807629": "https://www.drupal.org/files/issues/2021-04-20/2807629-39.patch",
"https://www.drupal.org/project/drupal/issues/2999491": "https://www.drupal.org/files/issues/2020-10-06/2999491--reusable-title-display--56.patch",
"https://www.drupal.org/project/drupal/issues/2981837": "https://www.drupal.org/files/issues/2019-05-22/findMigrationDependencies-null-process-value-2981837-5.patch",
"https://www.drupal.org/project/drupal/issues/2925297": "https://www.drupal.org/files/issues/2019-09-26/core-typed_config_handle_missing_config-2925297-18.patch",
Expand Down
32 changes: 18 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions tests/codeception/acceptance/Install/InstallStateCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,36 @@ public function testDeveloperShortcuts(AcceptanceTester $I) {
$I->canSeeNumberOfElements('#toolbar-item-shortcuts-tray a', 40);
}

/**
* A site manager should be able to place a page under an unpublished page.
*/
public function testUnpublishedMenuItems(AcceptanceTester $I) {
$I->logInWithRole('site_manager');
$I->amOnPage('/node/add/hs_basic_page');
$I->fillField('Title', 'Unpublished Parent');
$I->checkOption('Provide a menu link');
$I->fillField('Menu link title', 'Unpublished Parent');
$I->uncheckOption('Publish');
$I->click('Save');
$I->canSee('Unpublished Parent', 'h1');
$I->canSee('Unpublished Parent', 'nav a[data-unpublished-node]');
$I->canSee('Unpublished');

$I->amOnPage('/node/add/hs_basic_page');
$I->fillField('Title', 'Child Page');
$I->checkOption('Provide a menu link');
$I->fillField('Menu link title', 'Child Page');
$I->selectOption('Parent link', '-- Unpublished Parent');
$I->click('Change parent (update list of weights)');
$I->uncheckOption('Publish');
$I->click('Save');
$I->canSee('Child Page', 'h1');
$I->canSee('Child Page', 'nav a[data-unpublished-node]');
$I->canSee('Unpublished');

$I->click('Edit', '.tabs__tab');
$I->click('Save');
$I->assertEquals('/unpublished-parent/child-page', $I->grabFromCurrentUrl());
}

}

0 comments on commit c201580

Please sign in to comment.