Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
menu_css_names
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
menu_css_names
Merge requests
!12
Issue
#3451951
: Added a test to check if the toolbar 'Content' tab has the .content css class.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3451951
: Added a test to check if the toolbar 'Content' tab has the .content css class.
issue/menu_css_names-3451951:3451951-add-tests
into
2.0.x
Overview
4
Commits
6
Pipelines
7
Changes
1
Merged
Tyler Staples
requested to merge
issue/menu_css_names-3451951:3451951-add-tests
into
2.0.x
10 months ago
Overview
4
Commits
6
Pipelines
7
Changes
1
Expand
Closes
#3451951
0
0
Merge request reports
Compare
2.0.x
version 5
9935aa64
10 months ago
version 4
50be615c
10 months ago
version 3
49a21fe6
10 months ago
version 2
638755a9
10 months ago
version 1
98307543
10 months ago
2.0.x (base)
and
latest version
latest version
c0b793e1
6 commits,
10 months ago
version 5
9935aa64
5 commits,
10 months ago
version 4
50be615c
4 commits,
10 months ago
version 3
49a21fe6
3 commits,
10 months ago
version 2
638755a9
2 commits,
10 months ago
version 1
98307543
1 commit,
10 months ago
1 file
+
62
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tests/src/Functional/TestMenuCssNames.php
0 → 100644
+
62
−
0
Options
<?php
namespace
Drupal\Tests\menu_css_names\Functional
;
use
Drupal\Tests\BrowserTestBase
;
/**
* Tests the menu_css_names module.
*
* @group menu_css_names
*/
class
TestMenuCssNames
extends
BrowserTestBase
{
/**
* Modules to install.
*
* @var array
*/
protected
static
$modules
=
[
'node'
,
'toolbar'
,
'menu_css_names'
,
];
/**
* The default theme.
*
* @var string
*/
protected
$defaultTheme
=
'stark'
;
/**
* A simple user.
*
* @var \Drupal\user\UserInterface
*/
private
$user
;
/**
* Perform initial setup tasks that run before every test method.
*/
public
function
setUp
():
void
{
parent
::
setUp
();
$this
->
user
=
$this
->
drupalCreateUser
([
'access toolbar'
,
'access content overview'
,
]);
$this
->
drupalLogin
(
$this
->
user
);
}
/**
* Tests that the Content admin toolbar css class is present.
*/
public
function
testClassExists
()
{
$this
->
drupalGet
(
'/'
);
$this
->
assertSession
()
->
statusCodeEquals
(
200
);
// Check if the "Content" admin toolbar css class is present.
$this
->
assertSession
()
->
elementExists
(
'css'
,
'li.content'
);
}
}
Loading