Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
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
drupal
Merge requests
!2901
Couldn't fetch the linked file.
Issue
#3130107
: Extend unit test coverage for LanguageNegotiationContentEntity
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3130107
: Extend unit test coverage for LanguageNegotiationContentEntity
issue/drupal-3130107:3130107-add-unit-test
into
10.1.x
Overview
0
Commits
354
Pipelines
0
Changes
1
Open
Stefanos Petrakis
requested to merge
issue/drupal-3130107:3130107-add-unit-test
into
10.1.x
2 years ago
Overview
0
Commits
354
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
f7e0674d
Prev
Next
Show latest version
1 file
+
0
−
74
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
f7e0674d
Issue
#3317938
by catch, Lendude, nod_, quietone: views_ui LibraryCachIngTest is failing randomly
· f7e0674d
Dave Long
authored
2 years ago
core/modules/views_ui/tests/src/FunctionalJavascript/LibraryCachingTest.php deleted
100644 → 0
+
0
−
74
Options
<?php
namespace
Drupal\Tests\views_ui\FunctionalJavascript
;
use
Drupal\FunctionalJavascriptTests\WebDriverTestBase
;
/**
* Tests the JavaScript library caching on consecutive requests.
*
* @group views_ui
*/
class
LibraryCachingTest
extends
WebDriverTestBase
{
/**
* {@inheritdoc}
*/
protected
static
$modules
=
[
'node'
,
'views'
,
'views_ui'
];
/**
* {@inheritdoc}
*/
protected
$defaultTheme
=
'stark'
;
/**
* Tests if the Views UI dialogs open on consecutive requests.
*/
public
function
testConsecutiveDialogRequests
()
{
$admin_user
=
$this
->
drupalCreateUser
([
'administer site configuration'
,
'administer views'
,
'administer nodes'
,
'access content overview'
,
]);
// Disable automatic live preview to make the sequence of calls clearer.
\Drupal
::
configFactory
()
->
getEditable
(
'views.settings'
)
->
set
(
'ui.always_live_preview'
,
FALSE
)
->
save
();
$this
->
drupalLogin
(
$admin_user
);
$this
->
drupalGet
(
'admin/structure/views/view/content'
);
$page
=
$this
->
getSession
()
->
getPage
();
// Use the 'Add' link for fields to open a dialog. This will load the proper
// dialog libraries.
$add_link
=
$page
->
findById
(
'views-add-field'
);
$this
->
assertTrue
(
$add_link
->
isVisible
(),
'Add fields button found.'
);
$add_link
->
click
();
$this
->
assertJsCondition
(
"jQuery('.ui-dialog-titlebar').length > 0"
);
// Close the dialog and open it again. No no libraries will be loaded, but a
// cache entry will be made for not loading any libraries.
$page
->
pressButton
(
'Close'
);
$add_link
->
click
();
$this
->
assertJsCondition
(
"jQuery('.ui-dialog-titlebar').length > 0"
);
$page
->
pressButton
(
'Close'
);
// Reload the page.
$this
->
drupalGet
(
'admin/structure/views/view/content'
);
$page
=
$this
->
getSession
()
->
getPage
();
// Now use the 'Update preview' button to load libraries.
$preview
=
$page
->
findById
(
'preview-submit'
);
// The first click will load all the libraries.
$preview
->
click
();
$this
->
assertJsCondition
(
"jQuery('.ajax-progress').length === 0"
);
// The second click will not load any new libraries.
$preview
->
click
();
$this
->
assertJsCondition
(
"jQuery('.ajax-progress').length === 0"
);
// Check to see if the dialogs still open.
$add_link
=
$page
->
findById
(
'views-add-field'
);
$add_link
->
click
();
$this
->
assertJsCondition
(
"jQuery('.ui-dialog-titlebar').length > 0"
);
$page
->
pressButton
(
'Close'
);
}
}
Loading