Browse Source

tests: update to use defer

Ryan Chandler 4 years ago
parent
commit
a646a845c0

+ 3 - 2
tests/cypress/fixtures/persistence/check-persisted.html

@@ -1,7 +1,6 @@
 <html>
     <head>
-        <script src="/dist/spruce.umd.js"></script>
-        <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js"></script>
+        <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js" defer></script>
     </head>
     <body>
         <div x-data>
@@ -9,6 +8,8 @@
             <button @click="$store.persisted.foo = 'car'"></button>
         </div>
 
+        <script src="/dist/spruce.umd.js"></script>
+
         <script>
             Spruce.store('persisted', {
                 foo: 'bar'

+ 3 - 2
tests/cypress/fixtures/persistence/init.html

@@ -1,11 +1,12 @@
 <html>
     <head>
-        <script src="/dist/spruce.umd.js"></script>
-        <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js"></script>
+        <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js" defer></script>
     </head>
     <body>
         <p x-data x-text="$store.persisted.foo"></p>
 
+        <script src="/dist/spruce.umd.js"></script>
+        
         <script>
             Spruce.store('persisted', {
                 foo: 'bar'

+ 3 - 2
tests/cypress/fixtures/persistence/store-methods.html

@@ -1,7 +1,6 @@
 <html>
     <head>
-        <script src="/dist/spruce.umd.js"></script>
-        <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js"></script>
+        <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js" defer></script>
     </head>
     <body>
         <div x-data>
@@ -9,6 +8,8 @@
             <button @click="$store.persisted.changeFoo()"></button>
         </div>
 
+        <script src="/dist/spruce.umd.js"></script>
+
         <script>
             Spruce.store('persisted', {
                 foo: 'bar',

+ 3 - 2
tests/cypress/fixtures/watchers/init.html

@@ -1,13 +1,14 @@
 <html>
     <head>
-        <script src="/dist/spruce.umd.js"></script>
-        <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js"></script>
+        <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js" defer></script>
     </head>
     <body>
         <p x-data x-text="$store.persisted.foo"></p>
         <button x-data @click="$store.persisted.foo = 'car'"></button>
         <span x-data x-text="$store.persisted.bar"></span>
 
+        <script src="/dist/spruce.umd.js"></script>
+
         <script>
             Spruce.store('persisted', {
                 foo: 'bar',