fix: resets actions array when navigating out of view with actions (#4585)

This commit is contained in:
Patrik
2023-12-21 10:48:04 -05:00
committed by GitHub
parent 8015e999cd
commit 5c5523195c
8 changed files with 36 additions and 0 deletions

View File

@@ -310,6 +310,14 @@ describe('admin', () => {
await page.goto(`${globalWithPreview.global(globalSlug)}/api`)
await expect(page.locator('.app-header .global-api-button')).toHaveCount(1)
})
test('should reset actions array when navigating from view with actions to view without actions', async () => {
await page.goto(geoUrl.list)
await expect(page.locator('.app-header .collection-list-button')).toHaveCount(1)
await page.locator('button.nav-toggler[aria-label="Open Menu"][tabindex="0"]').click()
await page.locator(`#nav-posts`).click()
await expect(page.locator('.app-header .collection-list-button')).toHaveCount(0)
})
})
describe('ui', () => {