Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443556
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443556
Commits
82c976fc
Commit
82c976fc
authored
1 year ago
by
Scott Carpenter
Browse files
Options
Downloads
Patches
Plain Diff
check for managed tabs links
parent
ed74010f
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#161009
canceled
1 year ago
Stage: 🏗️ Build
Stage: 🪄 Lint
Stage: 🗜️ Test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/navigation/tests/src/Functional/NavigationBaseTest.php
+12
-5
12 additions, 5 deletions
...es/navigation/tests/src/Functional/NavigationBaseTest.php
with
12 additions
and
5 deletions
core/modules/navigation/tests/src/Functional/NavigationBaseTest.php
+
12
−
5
View file @
82c976fc
...
...
@@ -4,6 +4,7 @@
namespace
Drupal\Tests\navigation\Functional
;
use
Drupal\Core\Url
;
use
Drupal\layout_builder
\Entity\LayoutBuilderEntityViewDisplay
;
use
Drupal\Tests\BrowserTestBase
;
...
...
@@ -80,14 +81,20 @@ protected function setUp(): void {
public
function
testLayoutBuilderLogoVisibility
()
{
$this
->
drupalGet
(
'/admin/config/user-interface/navigation-block'
);
// The Logo acts as a 'return to site' landmark item. It should also be seen on
// the Layout Builder as Layout 'preview' mode disables all links.
// Check for Managed Tab links. Travel between them.
$gotoSettings
=
$this
->
getSession
()
->
getPage
()
->
findLink
(
'Manage Settings'
)
.
click
();
$this
->
assertSession
()
->
pageTextContains
(
'Logo options'
);
$gotoSettings
=
$this
->
getSession
()
->
getPage
()
->
findLink
(
'Manage Layout'
)
.
click
();
$this
->
assertSession
()
->
pageTextContains
(
'Edit layout for Navigation'
);
// Check the Logo visibility, acts as a 'return to site' landmark.
$this
->
assertSession
()
->
elementExists
(
'xpath'
,
"//div[contains(@class, 'admin-toolbar__logo')]"
);
// Check for
additional
'Return to site'
href in
form.
// Check for 'Return to site'
link in the layout builder
form.
$link
=
$this
->
getSession
()
->
getPage
()
->
findLink
(
'Return to site'
);
$this
->
assertNotNull
(
$link
,
'The link "Return to site" is present on the layout builder.'
);
$this
->
assertNotNull
(
$link
,
"The link 'Return to site' is present on the layout builder."
);
$front_page_path
=
Url
::
fromRoute
(
'<front>'
)
->
toString
();
$this
->
assertEquals
(
$front_page_path
,
$link
->
getAttribute
(
'href'
),
"The href attribute of 'Return to site' links to <front>."
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment