@@ -855,18 +855,16 @@ module('Acceptance | code submode tests', function (_hooks) {
855
855
submode : 'code' ,
856
856
codePath : `${ testRealmURL } broken.gts` ,
857
857
} ) ! ;
858
-
859
858
await visit (
860
859
`/?operatorModeEnabled=true&operatorModeState=${ encodeURIComponent (
861
860
operatorModeStateParam ,
862
861
) } `,
863
862
) ;
864
-
865
863
await waitFor ( '[data-test-syntax-error]' ) ;
866
-
867
864
assert
868
865
. dom ( '[data-test-syntax-error]' )
869
866
. includesText ( '/broken.gts: Missing semicolon. (1:4)' ) ;
867
+ assert . dom ( '[data-test-module-error-panel] > button' ) . isDisabled ( ) ;
870
868
} ) ;
871
869
872
870
test ( 'it shows card preview errors' , async function ( assert ) {
@@ -1790,41 +1788,50 @@ module('Acceptance | code submode tests', function (_hooks) {
1790
1788
assert
1791
1789
. dom ( '[data-test-selected-accordion-item="schema-editor"]' )
1792
1790
. exists ( 'defaults to schema-editor view' ) ;
1793
- await click ( '[data-test-accordion-item="spec-preview"] > button' ) ; // select spec panel
1791
+ await click ( '[data-test-accordion-item="playground"] > button' ) ;
1792
+ assert . dom ( '[data-test-selected-accordion-item="playground"]' ) . exists ( ) ;
1794
1793
1795
1794
await click ( '[data-test-file-browser-toggle]' ) ;
1796
1795
await click ( '[data-test-file="address.gts"]' ) ;
1797
1796
assert . dom ( '[data-test-selected-accordion-item="spec-preview"]' ) . exists ( ) ;
1798
1797
assert . dom ( '[data-test-accordion-item="spec-preview"]' ) . hasClass ( 'open' ) ;
1798
+ await click ( '[data-test-accordion-item="spec-preview"] > button' ) ;
1799
+ assert
1800
+ . dom ( '[data-test-selected-accordion-item="playground"]' )
1801
+ . exists ( 'closing the final panel opens the previous panel' ) ;
1799
1802
1800
1803
await click ( '[data-test-file="country.gts"]' ) ;
1801
1804
assert . dom ( '[data-test-rhs-panel="card-or-field"]' ) . exists ( ) ;
1802
- assert . dom ( '[data-test-selected-accordion-item]' ) . doesNotExist ( ) ;
1803
- await click ( '[data-test-accordion-item="playground"] > button' ) ; // open playground
1804
- assert . dom ( '[data-test-selected-accordion-item="playground"]' ) . exists ( ) ;
1805
+ assert
1806
+ . dom ( '[data-test-selected-accordion-item="schema-editor"]' )
1807
+ . exists ( ) ;
1808
+ await click ( '[data-test-accordion-item="spec-preview"] > button' ) ; // open spec preview
1809
+ assert . dom ( '[data-test-selected-accordion-item="spec-preview"]' ) . exists ( ) ;
1805
1810
1806
1811
await click ( '[data-test-file="person.gts"]' ) ;
1807
1812
assert
1808
1813
. dom ( '[data-test-selected-accordion-item="schema-editor"]' )
1809
1814
. exists ( ) ;
1810
- await click ( '[data-test-accordion-item="schema-editor"] > button' ) ; // close schema-editor panel
1811
- assert . dom ( '[data-test-rhs-panel="card-or-field"]' ) . exists ( ) ;
1812
- assert . dom ( '[data-test-selected-accordion-item]' ) . doesNotExist ( ) ;
1813
1815
1814
1816
await click ( '[data-test-file="pet-person.gts"]' ) ;
1815
1817
assert . dom ( '[data-test-selected-accordion-item="playground"]' ) . exists ( ) ;
1818
+ await click ( '[data-test-accordion-item="playground"] > button' ) ; // toggle playground closed
1819
+ assert . dom ( '[data-test-rhs-panel="card-or-field"]' ) . exists ( ) ;
1820
+ assert
1821
+ . dom ( '[data-test-selected-accordion-item="spec-preview"]' )
1822
+ . exists ( 'closing panel toggles next panel open' ) ;
1816
1823
1817
1824
let currentSelections = window . localStorage . getItem (
1818
1825
CodeModePanelSelections ,
1819
1826
) ;
1820
1827
assert . strictEqual (
1821
1828
currentSelections ,
1822
1829
JSON . stringify ( {
1823
- [ `${ testRealmURL } address.gts` ] : 'spec-preview ' ,
1824
- [ `${ testRealmURL } country.gts` ] : 'playground ' ,
1825
- [ `${ testRealmURL } person.gts` ] : null ,
1826
- [ `${ testRealmURL } pet-person.gts` ] : 'playground ' ,
1827
- [ `${ testRealmURL } pet.gts` ] : 'spec-preview ' ,
1830
+ [ `${ testRealmURL } address.gts` ] : 'playground ' ,
1831
+ [ `${ testRealmURL } country.gts` ] : 'spec-preview ' ,
1832
+ [ `${ testRealmURL } person.gts` ] : 'schema-editor' ,
1833
+ [ `${ testRealmURL } pet-person.gts` ] : 'spec-preview ' ,
1834
+ [ `${ testRealmURL } pet.gts` ] : 'playground ' ,
1828
1835
} ) ,
1829
1836
) ;
1830
1837
} ) ;
0 commit comments