Skip to content

Commit

Permalink
fix(test): restore skipped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobonamin committed Jan 15, 2025
1 parent b2330a6 commit 4d24828
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ beforeEach(() => {
;(isLiveEditEnabled as Mock).mockClear()
})

// TODO: Restore this test
describe.skip('publish', () => {
describe('publish', () => {
describe('disabled', () => {
// kind of a useless test but preserves the order at least
it('returns with LIVE_EDIT_ENABLED if isLiveEditEnabled', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ beforeEach(() => {
;(isLiveEditEnabled as Mock).mockClear()
})

// TODO: Restore this test
describe.skip('publish', () => {
describe('publish', () => {
describe('disabled', () => {
it('returns with LIVE_EDIT_ENABLED if isLiveEditEnabled', () => {
;(isLiveEditEnabled as Mock).mockImplementation(
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/tests/document-actions/unpublish.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ test(`should be able to unpublish a published document`, async ({page, createDra
await expect(unpublishModal).toBeVisible()
await page.getByTestId('confirm-button').click()

await expect(documentStatus).toContainText('')
// Check the published button is disabled that is the reference to determine the published document doesn't exist.
const button = await page.getByRole('button', {name: 'Published'})
await expect(button).toBeDisabled()
await expect(documentStatus).toContainText('Draft Edited just now')
})

0 comments on commit 4d24828

Please # to comment.