Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
WCMS
uw_base_profile
Commits
c441c966
Commit
c441c966
authored
Oct 15, 2021
by
Liam Morland
Browse files
ISTWCMS-5085: Refactor: Move home page menu edit test
parent
f2a698e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
tests/src/Functional/UwWcmsBasicTest.php
tests/src/Functional/UwWcmsBasicTest.php
+10
-10
No files found.
tests/src/Functional/UwWcmsBasicTest.php
View file @
c441c966
...
...
@@ -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"]'
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment