@@ -69,6 +69,7 @@ describe('admin1', () => {
69
69
let page : Page
70
70
let geoUrl : AdminUrlUtil
71
71
let postsUrl : AdminUrlUtil
72
+ let globalURL : AdminUrlUtil
72
73
let customViewsURL : AdminUrlUtil
73
74
let disableDuplicateURL : AdminUrlUtil
74
75
let serverURL : string
@@ -87,6 +88,7 @@ describe('admin1', () => {
87
88
} ) )
88
89
geoUrl = new AdminUrlUtil ( serverURL , geoCollectionSlug )
89
90
postsUrl = new AdminUrlUtil ( serverURL , postsCollectionSlug )
91
+ globalURL = new AdminUrlUtil ( serverURL , globalSlug )
90
92
customViewsURL = new AdminUrlUtil ( serverURL , customViews2CollectionSlug )
91
93
disableDuplicateURL = new AdminUrlUtil ( serverURL , disableDuplicateSlug )
92
94
@@ -616,6 +618,22 @@ describe('admin1', () => {
616
618
} )
617
619
} )
618
620
621
+ describe ( 'form state' , ( ) => {
622
+ test ( 'collection — should re-enable fields after save' , async ( ) => {
623
+ await page . goto ( postsUrl . create )
624
+ await page . locator ( '#field-title' ) . fill ( title )
625
+ await saveDocAndAssert ( page )
626
+ await expect ( page . locator ( '#field-title' ) ) . toBeEnabled ( )
627
+ } )
628
+
629
+ test ( 'global — should re-enable fields after save' , async ( ) => {
630
+ await page . goto ( globalURL . global ( globalSlug ) )
631
+ await page . locator ( '#field-title' ) . fill ( title )
632
+ await saveDocAndAssert ( page )
633
+ await expect ( page . locator ( '#field-title' ) ) . toBeEnabled ( )
634
+ } )
635
+ } )
636
+
619
637
describe ( 'document titles' , ( ) => {
620
638
test ( 'collection — should render fallback titles when creating new' , async ( ) => {
621
639
await page . goto ( postsUrl . create )
@@ -647,15 +665,19 @@ describe('admin1', () => {
647
665
} )
648
666
649
667
test ( 'global — should render custom, localized label' , async ( ) => {
650
- await page . goto ( postsUrl . admin )
651
- await page . waitForURL ( postsUrl . admin )
668
+ await page . goto ( globalURL . global ( globalSlug ) )
669
+ await page . waitForURL ( globalURL . global ( globalSlug ) )
652
670
await openNav ( page )
653
671
const label = 'My Global Label'
654
672
const globalLabel = page . locator ( `#nav-global-global` )
655
673
await expect ( globalLabel ) . toContainText ( label )
656
674
await globalLabel . click ( )
657
675
await checkPageTitle ( page , label )
658
676
await checkBreadcrumb ( page , label )
677
+ await page . locator ( '#field-title' ) . fill ( title )
678
+ await saveDocAndAssert ( page )
679
+ await checkPageTitle ( page , label )
680
+ await checkBreadcrumb ( page , label )
659
681
} )
660
682
661
683
test ( 'global — should render simple label strings' , async ( ) => {
0 commit comments