Resolve #3463875 "Bigpipe loadjs errors isdefined"
3 unresolved threads
Closes #3463875
Merge request reports
Activity
4 5 namespace Drupal\Tests\config\FunctionalJavascript; 6 7 use Drupal\FunctionalJavascriptTests\WebDriverTestBase; 8 9 /** 10 * Tests the user interface for importing configuration. 11 * 12 * @group config 13 */ 14 class ConfigImportUIAjaxTest extends WebDriverTestBase { 15 16 /** 17 * Modules to install. 18 * 19 * @var array changed this line in version 2 of the diff
49 $sync->write('system.site', $config_data); 50 $this->assertTrue($sync->exists($name), $name . ' found.'); 51 52 // Verify that system.site appears as ready to import. 53 $this->drupalGet('admin/config/development/configuration'); 54 $this->assertSession()->responseContains('<td>' . $name); 55 $this->assertSession()->buttonExists('Import all'); 56 57 // Click the dropbutton to show the differences in a modal and close it. 58 $page->find('css', '.dropbutton-action')->click(); 59 $assert_session->waitForElementVisible('css', '.ui-dialog'); 60 $assert_session->assertVisibleInViewport('css', '.ui-dialog .ui-dialog-content'); 61 $page->pressButton('Close'); 62 $assert_session->assertNoElementAfterWait('css', '.ui-dialog'); 63 64 // Click the dropbutton again. changed this line in version 3 of the diff
assigned to @quietone
added 79 commits
Toggle commit listadded 6 commits
- 7716ae8d - Issue #3463875: Add, use counter for making bundle IDs passed to loadjs unique.
- ebbc150f - Added test
- ac3eeade - Check if loadjs bundle already defined.
- bf0215c5 - Apply 1 suggestion(s) to 1 file(s)
- 2a901cac - Clean-up
- 32294ebd - Merge branch '3463875-bigpipe-loadjs-errors-isdefined' of...
Toggle commit listadded 1 commit
- f6a15739 - Nope, that was making it unclear on where the test failed.
1720 1720 */ 1721 1721 add_css(ajax, response, status) { 1722 1722 const allUniqueBundleIds = response.data.map(function (style) { 1723 const uniqueBundleId = style.href + ajax.instanceIndex; 1723 const uniqueBundleId = style.href; loadjs.isDefined()
checks for existing bundle ID, so there's no need to differentiate additional instances. Since it's the same href, it's already been loaded, and isDefined() gates it from trying to load again.Edited by godotislatesee https://github.com/kubetail-org/loadjs Documentation
12. Check if bundle has already been defined if (!loadjs.isDefined('foobar')) { loadjs(['/path/to/foo.js', '/path/to/bar.js'], 'foobar', function() { /* foo.js & bar.js loaded */ }); }
unassigned @quietone
Please register or sign in to reply