File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
<cfoutput >
2
2
<!-- CBWIRE SCRIPTS -->
3
- <script src =" #getEvent ().getModuleRoot ( ' cbwire' ) #/includes/js/livewire.js?id=239a5c52" data-csrf =" #generateCSRFToken () #" data-update-uri =" #getUpdateEndpoint () #" data-navigate-once =" true" ></script >
3
+ <script src =" #getEvent ().getModuleRoot ( ' cbwire' ) #/includes/js/livewire.js?id=239a5c52" < cfif not moduleSettings . showProgressBar > data-no-progress-bar </ cfif > data-csrf =" #generateCSRFToken () #" data-update-uri =" #getUpdateEndpoint () #" data-navigate-once =" true" ></script >
4
4
5
5
<script data-navigate-once =" true" >
6
6
document .addEventListener (' livewire:init' , () => {
Original file line number Diff line number Diff line change @@ -55,6 +55,20 @@ component extends="coldbox.system.testing.BaseTestCase" {
55
55
expect ( html ).toInclude ( " --livewire-progress-bar-color: ## cc0000;" );
56
56
} );
57
57
58
+ it ( " should show the progress bar by default" , function () {
59
+ var CBWIREController = getInstance ( " CBWIREController@cbwire" );
60
+ var html = CBWIREController .getScripts ();
61
+ expect ( html ).notToInclude ( " data-no-progress-bar " );
62
+ } );
63
+
64
+ it ( " should be able to disable the progress bar" , function () {
65
+ var CBWIREController = getInstance ( " CBWIREController@cbwire" );
66
+ var settings = getInstance ( " coldbox:modulesettings:cbwire" );
67
+ settings .showProgressBar = false ;
68
+ var html = CBWIREController .getScripts ();
69
+ expect ( html ).toInclude ( " data-no-progress-bar " );
70
+ } );
71
+
58
72
it ( " should have default updateEndpoint" , function () {
59
73
var CBWIREController = getInstance ( " CBWIREController@cbwire" );
60
74
var settings = getInstance ( " coldbox:modulesettings:cbwire" );
You can’t perform that action at this time.
0 commit comments