Commit c441c966 authored by Liam Morland's avatar Liam Morland
Browse files

ISTWCMS-5085: Refactor: Move home page menu edit test

parent f2a698e7
......@@ -1565,16 +1565,6 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->drupalLogin($this->drupalUsers['uw_role_site_manager']);
// No access to edit home page menu entry.
$this->drupalGet('admin/structure/menu/link/uw_base_profile.front_page/edit');
$this->assertSession()->statusCodeEquals(403);
// Test that the home page cannot be the parent of any item. Using first
// menu item that was created.
$this->drupalGet('admin/structure/menu/item/1/edit');
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->elementExists('css', 'select#edit-menu-parent');
$this->assertSession()->elementNotExists('css', 'select#edit-menu-parent > option[value="main:uw_base_profile.front_page"]');
// Test that main menu has disabled Catalogs menu link.
$this->drupalGet('admin/structure/menu/manage/main');
$this->assertSession()->statusCodeEquals(200);
......@@ -1585,6 +1575,16 @@ class UwWcmsBasicTest extends BrowserTestBase {
// to validate if checkbox is unchecked.
$menu_uuid = $this->getSession()->getPage()->findLink('Catalogs')->getParent()->getParent()->getAttribute('data-drupal-selector');
$this->assertSession()->checkboxNotChecked($menu_uuid . '-enabled');
// No access to edit home page menu entry.
$this->drupalGet('admin/structure/menu/link/uw_base_profile.front_page/edit');
$this->assertSession()->statusCodeEquals(403);
// Test that the home page cannot be the parent of any item. Using first
// menu item that was created.
$this->drupalGet('admin/structure/menu/item/1/edit');
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->elementExists('css', 'select#edit-menu-parent');
$this->assertSession()->elementNotExists('css', 'select#edit-menu-parent > option[value="main:uw_base_profile.front_page"]');
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment