Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3464530
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-3464530
Commits
b2954354
Unverified
Commit
b2954354
authored
8 months ago
by
Théodore Biadala
Browse files
Options
Downloads
Patches
Plain Diff
tweak tests
parent
484a9364
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php
+13
-12
13 additions, 12 deletions
...er/tests/src/FunctionalJavascript/UserPermissionsTest.php
with
13 additions
and
12 deletions
core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php
+
13
−
12
View file @
b2954354
...
...
@@ -50,7 +50,7 @@ protected function setUp(): void {
}
/**
* Tests the
dummy
checkboxes added to the permissions page.
* Tests the
fake
checkboxes added to the permissions page.
*/
public
function
testPermissionCheckboxes
():
void
{
$this
->
drupalLogin
(
$this
->
adminUser
);
...
...
@@ -58,24 +58,25 @@ public function testPermissionCheckboxes(): void {
$page
=
$this
->
getSession
()
->
getPage
();
$wrapper
=
$page
->
find
(
'css'
,
'.form-item-'
.
$this
->
rid
.
'-administer-modules'
);
$real_checkbox
=
$wrapper
->
find
(
'css'
,
'.real-checkbox'
);
$dummy_checkbox
=
$wrapper
->
find
(
'css'
,
'.dummy-checkbox'
);
$fake_checkbox
=
$wrapper
->
find
(
'css'
,
'.fake-checkbox'
);
// The real per-role checkbox is visible and unchecked, the dummy copy is
// invisible.
$this
->
assertTrue
(
$real_checkbox
->
isVisible
());
$this
->
assertFalse
(
$real_checkbox
->
isChecked
());
$this
->
assertFalse
(
$dummy_checkbox
->
isVisible
());
// The real per-role checkbox is visible and unchecked, the fake copy does
// not exist yet.
$this
->
assertNull
(
$fake_checkbox
);
// Enable the permission for all authenticated users.
$page
->
findField
(
'authenticated[administer modules]'
)
->
click
();
// The real and dummy checkboxes switch visibility and the dummy is now both
// The checkboxes have been initialized.
$real_checkbox
=
$wrapper
->
find
(
'css'
,
'.real-checkbox'
);
$fake_checkbox
=
$wrapper
->
find
(
'css'
,
'.fake-checkbox'
);
// The real and fake checkboxes switch visibility and the fake is now both
// checked and disabled.
$this
->
assertFalse
(
$real_checkbox
->
isVisible
());
$this
->
assertTrue
(
$
dummy
_checkbox
->
isVisible
());
$this
->
assertTrue
(
$
dummy
_checkbox
->
isChecked
());
$this
->
assertTrue
(
$
dummy
_checkbox
->
hasAttribute
(
'disabled'
));
$this
->
assertTrue
(
$
fake
_checkbox
->
isVisible
());
$this
->
assertTrue
(
$
fake
_checkbox
->
isChecked
());
$this
->
assertTrue
(
$
fake
_checkbox
->
hasAttribute
(
'disabled'
));
}
}
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