Commit 2a3a341d authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '3.0.x' into prod/3.0.x

parents c4aa010b b2c4efbd
...@@ -1498,8 +1498,9 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -1498,8 +1498,9 @@ class UwWcmsBasicTest extends BrowserTestBase {
// No access to edit home page menu entry. // No access to edit home page menu entry.
$this->drupalGet('admin/structure/menu/link/uw_base_profile.front_page/edit'); $this->drupalGet('admin/structure/menu/link/uw_base_profile.front_page/edit');
$this->assertSession()->statusCodeEquals(403); $this->assertSession()->statusCodeEquals(403);
// Test that the home page cannot be the parent of any item. // Test that the home page cannot be the parent of any item. Using first
$this->drupalGet('admin/structure/menu/link/uw_main_menu.blog/edit'); // menu item that was created.
$this->drupalGet('admin/structure/menu/item/1/edit');
$this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200);
$this->assertSession()->elementExists('css', 'select#edit-menu-parent'); $this->assertSession()->elementExists('css', 'select#edit-menu-parent');
$this->assertSession()->elementNotExists('css', 'select#edit-menu-parent > option[value="main:uw_base_profile.front_page"]'); $this->assertSession()->elementNotExists('css', 'select#edit-menu-parent > option[value="main:uw_base_profile.front_page"]');
...@@ -1508,7 +1509,12 @@ class UwWcmsBasicTest extends BrowserTestBase { ...@@ -1508,7 +1509,12 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->drupalGet('admin/structure/menu/manage/main'); $this->drupalGet('admin/structure/menu/manage/main');
$this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200);
$this->assertEquals(base_path() . 'catalogs', $this->getSession()->getPage()->findLink('Catalogs')->getAttribute('href')); $this->assertEquals(base_path() . 'catalogs', $this->getSession()->getPage()->findLink('Catalogs')->getAttribute('href'));
$this->assertSession()->checkboxNotChecked('edit-links-menu-plugin-iduw-main-menucatalogs-enabled');
// All menus items created using menu_link_content have uuid as part
// of their id. Getting menu id from tr element. And using that menu id
// 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');
} }
/** /**
......
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