Commit 908349d1 authored by Igor Biki's avatar Igor Biki Committed by Liam Morland
Browse files

ISTWCMS-5009: Update tests after main menu updates

parent 17c10ee1
......@@ -1498,8 +1498,9 @@ class UwWcmsBasicTest extends BrowserTestBase {
// 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.
$this->drupalGet('admin/structure/menu/link/uw_main_menu.blog/edit');
// 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"]');
......@@ -1508,7 +1509,12 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->drupalGet('admin/structure/menu/manage/main');
$this->assertSession()->statusCodeEquals(200);
$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