Commit 71ab968 1 parent 635e901 commit 71ab968 Copy full SHA for 71ab968
File tree 1 file changed +18
-6
lines changed
test/development/pages-dir/client-navigation
1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -1672,30 +1672,42 @@ describe.each([[false], [true]])(
1672
1672
await waitFor ( 2000 )
1673
1673
expect (
1674
1674
Number ( await browser . eval ( 'window.__test_async_executions' ) )
1675
- ) . toBe ( 1 )
1675
+ ) . toBe (
1676
+ strictNextHead
1677
+ ? 1
1678
+ : // <meta name="next-head-count" /> is floated before <script />.
1679
+ // head-manager thinks it needs t add these again resulting in another execution.
1680
+ 2
1681
+ )
1676
1682
expect (
1677
1683
Number ( await browser . eval ( 'window.__test_defer_executions' ) )
1678
- ) . toBe ( 1 )
1684
+ ) . toBe (
1685
+ strictNextHead
1686
+ ? 1
1687
+ : // <meta name="next-head-count" /> is floated before <script defer />.
1688
+ // head-manager thinks it needs t add these again resulting in another execution.
1689
+ 2
1690
+ )
1679
1691
1680
1692
await browser . elementByCss ( '#reverseScriptOrder' ) . click ( )
1681
1693
await waitFor ( 2000 )
1682
1694
1683
1695
expect (
1684
1696
Number ( await browser . eval ( 'window.__test_async_executions' ) )
1685
- ) . toBe ( 1 )
1697
+ ) . toBe ( strictNextHead ? 1 : 2 )
1686
1698
expect (
1687
1699
Number ( await browser . eval ( 'window.__test_defer_executions' ) )
1688
- ) . toBe ( 1 )
1700
+ ) . toBe ( strictNextHead ? 1 : 2 )
1689
1701
1690
1702
await browser . elementByCss ( '#toggleScript' ) . click ( )
1691
1703
await waitFor ( 2000 )
1692
1704
1693
1705
expect (
1694
1706
Number ( await browser . eval ( 'window.__test_async_executions' ) )
1695
- ) . toBe ( 1 )
1707
+ ) . toBe ( strictNextHead ? 1 : 2 )
1696
1708
expect (
1697
1709
Number ( await browser . eval ( 'window.__test_defer_executions' ) )
1698
- ) . toBe ( 1 )
1710
+ ) . toBe ( strictNextHead ? 1 : 2 )
1699
1711
} finally {
1700
1712
if ( browser ) {
1701
1713
await browser . close ( )
You can’t perform that action at this time.
0 commit comments