-
Notifications
You must be signed in to change notification settings - Fork 2.9k
V14 QA Added Content acceptance tests #16289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 39 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
afb1675
Added api tests for Document - not done
nhudinh0309 7fe8706
Added ui tests for Content - not done
nhudinh0309 aa96d9a
Added api test for Documents
nhudinh0309 d94b5d6
Added ui tests for Content
nhudinh0309 fcf6995
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 079c662
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 5b3bfe1
Updated method name due to ui changes
nhudinh0309 d18aac3
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 56aa3b4
Bumped version of test helpers and json builders
nhudinh0309 e5b2d40
Added smoke tag to run all Content tests in the pipeline
nhudinh0309 1956fe5
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 f6b0388
Bumped version of json builder
nhudinh0309 8191619
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 1e45429
Revert files
nhudinh0309 e5b1c27
Updated the syntax of smoke tag
nhudinh0309 660b984
Added tests for content with different property editors
nhudinh0309 2339f42
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 9a775ef
Added tests for Info Tab
nhudinh0309 a865c57
Added more steps for before tests
nhudinh0309 689faa2
Added more tests for Redirect Management
nhudinh0309 2e22950
Added more tests for Content
nhudinh0309 d7a6313
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 c17b085
Bumped version of test helper
nhudinh0309 6ce5973
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 f249232
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 9f330c1
Changed test name
nhudinh0309 c76f785
Merge branch 'v14/dev' into v14/QA/content-acceptance-tests
nhudinh0309 d1deca7
Updated the method name due to the test helper changes
nhudinh0309 596c6cc
Fixed typo
nhudinh0309 caad29b
Added more waits and skip tests
nhudinh0309 cc80b70
Updated the test name
nhudinh0309 04b05d1
Changed click action for save button
nhudinh0309 1fa13b8
Bumped version of test helper
nhudinh0309 e54e0f7
Bumped version of test helper
nhudinh0309 2a8af2d
Updated choose document type step after clicking create button due to…
nhudinh0309 563200b
Added skip tests
nhudinh0309 c5f3e5f
Changed clean method
nhudinh0309 984e29f
Fixed arrange step
nhudinh0309 3e6d17c
Fixed the arrange steps
nhudinh0309 e9dc481
Removed test.describe and unnecessary variables
nhudinh0309 ed99096
Added smoke tests
nhudinh0309 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
tests/Umbraco.Tests.AcceptanceTest/tests/ApiTesting/Document/Document.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import {test} from '@umbraco/playwright-testhelpers'; | ||
| import {expect} from "@playwright/test"; | ||
|
|
||
| test.describe('Documents tests', () => { | ||
| let documentTypeId = ''; | ||
| let documentId = ''; | ||
| const documentName = 'TestDocument'; | ||
| const documentTypeName = 'TestDocumentType'; | ||
|
|
||
| test.beforeEach(async ({umbracoApi}) => { | ||
| await umbracoApi.documentType.ensureNameNotExists(documentTypeName); | ||
| documentTypeId = await umbracoApi.documentType.createDefaultDocumentTypeWithAllowAsRoot(documentTypeName); | ||
| }); | ||
|
|
||
| test.afterEach(async ({umbracoApi}) => { | ||
| await umbracoApi.document.ensureNameNotExists(documentName); | ||
| await umbracoApi.documentType.ensureNameNotExists(documentTypeName); | ||
| }); | ||
|
|
||
| test('can create a document', async ({umbracoApi}) => { | ||
| // Act | ||
| await umbracoApi.document.createDefaultDocument(documentName, documentTypeId); | ||
|
|
||
| // Assert | ||
| expect(await umbracoApi.document.doesNameExist(documentName)).toBeTruthy(); | ||
| }); | ||
|
|
||
| test('can delete a document', async ({umbracoApi}) => { | ||
| // Arrange | ||
| documentId = await umbracoApi.document.createDefaultDocument(documentName, documentTypeId); | ||
| expect(umbracoApi.document.doesExist(documentId)).toBeTruthy(); | ||
|
|
||
| // Act | ||
| await umbracoApi.document.delete(documentId); | ||
|
|
||
| // Assert | ||
| expect(await umbracoApi.document.doesNameExist(documentName)).toBeFalsy(); | ||
| }); | ||
|
|
||
| test('can update a document', async ({umbracoApi}) => { | ||
| // Arrange | ||
| const wrongName = 'WrongDocument'; | ||
| documentId = await umbracoApi.document.createDefaultDocument(wrongName, documentTypeId); | ||
| expect(await umbracoApi.document.doesNameExist(wrongName)).toBeTruthy(); | ||
| let documentData = await umbracoApi.document.get(documentId); | ||
| documentData.variants[0].name = documentName; | ||
|
|
||
| // Act | ||
| await umbracoApi.document.update(documentData.id, documentData); | ||
|
|
||
| // Assert | ||
| const updatedDocumentData = await umbracoApi.document.get(documentId); | ||
| expect(updatedDocumentData.variants[0].name).toEqual(documentName); | ||
| }); | ||
| }); |
137 changes: 137 additions & 0 deletions
137
tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ChildrenContent.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; | ||
| import {expect} from "@playwright/test"; | ||
|
|
||
| // Remove smoke tag before merging | ||
| test.describe('Children content tests', {tag: '@smoke'}, () => { | ||
| let documentTypeId = ''; | ||
| let childDocumentTypeId = ''; | ||
| let contentId = ''; | ||
| const contentName = 'TestContent'; | ||
| const childContentName = 'ChildContent'; | ||
| const documentTypeName = 'DocumentTypeForContent'; | ||
| const childDocumentTypeName = 'ChildDocumentTypeForContent'; | ||
|
|
||
| test.beforeEach(async ({umbracoApi}) => { | ||
| await umbracoApi.documentType.ensureNameNotExists(documentTypeName); | ||
| await umbracoApi.document.ensureNameNotExists(contentName); | ||
| await umbracoApi.documentType.ensureNameNotExists(childDocumentTypeName); | ||
| }); | ||
|
|
||
| test.afterEach(async ({umbracoApi}) => { | ||
| await umbracoApi.document.ensureNameNotExists(contentName); | ||
| await umbracoApi.documentType.ensureNameNotExists(childDocumentTypeName); | ||
| await umbracoApi.documentType.ensureNameNotExists(documentTypeName); | ||
| }); | ||
|
|
||
| test('can create child node', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| childDocumentTypeId = await umbracoApi.documentType.createDefaultDocumentType(childDocumentTypeName); | ||
| documentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNode(documentTypeName, childDocumentTypeId, true); | ||
| contentId = await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickActionsMenuForContent(contentName); | ||
| await umbracoUi.content.clickCreateButton(); | ||
| await umbracoUi.content.chooseDocumentType(documentTypeName); | ||
| await umbracoUi.content.enterContentName(childContentName); | ||
| await umbracoUi.content.clickSaveButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| expect(await umbracoApi.document.doesNameExist(childContentName)).toBeTruthy(); | ||
| const childData = await umbracoApi.document.getChildren(contentId); | ||
| expect(childData[0].variants[0].name).toBe(childContentName); | ||
| // verify that the child content displays in the tree after reloading children | ||
| await umbracoUi.content.clickActionsMenuForContent(contentName); | ||
| await umbracoUi.content.clickReloadButton(); | ||
| await umbracoUi.content.clickCaretButtonForContentName(contentName); | ||
| await umbracoUi.content.doesContentTreeHaveName(childContentName); | ||
|
|
||
| // Clean | ||
| await umbracoApi.document.ensureNameNotExists(childContentName); | ||
| }); | ||
|
|
||
| // TODO: Remove skip when the front-end is ready. | ||
| test.skip('can create child node in child node', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| const childOfChildContentName = 'ChildOfChildContent'; | ||
| const childOfChildDocumentTypeName = 'ChildOfChildDocumentType'; | ||
| let childOfChildDocumentTypeId: any; | ||
| let childContentId: any; | ||
| await umbracoApi.documentType.ensureNameNotExists(childOfChildDocumentTypeName); | ||
| childOfChildDocumentTypeId = await umbracoApi.documentType.createDefaultDocumentType(childOfChildDocumentTypeName); | ||
| childDocumentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNode(childDocumentTypeName, childOfChildDocumentTypeId, true); | ||
| documentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNode(documentTypeName, childDocumentTypeId, true); | ||
| contentId = await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); | ||
| childContentId = await umbracoApi.document.createDefaultDocumentWithParent(childContentName, childDocumentTypeId, contentId); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickCaretButtonForContentName(contentName); | ||
| await umbracoUi.content.clickActionsMenuForContent(childContentName); | ||
| await umbracoUi.content.clickCreateButton(); | ||
| await umbracoUi.content.clickLabelWithName(childOfChildDocumentTypeName); | ||
| // This wait is needed | ||
| await umbracoUi.waitForTimeout(500); | ||
| await umbracoUi.content.enterContentName(childOfChildContentName); | ||
| await umbracoUi.content.clickSaveButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| const childOfChildData = await umbracoApi.document.getChildren(childContentId); | ||
| expect(childOfChildData[0].variants[0].name).toBe(childOfChildContentName); | ||
| // verify that the child content displays in the tree after reloading children | ||
| await umbracoUi.content.clickActionsMenuForContent(contentName); | ||
| await umbracoUi.content.clickReloadButton(); | ||
| await umbracoUi.content.clickCaretButtonForContentName(childContentName); | ||
| await umbracoUi.content.doesContentTreeHaveName(childOfChildContentName); | ||
|
|
||
| // Clean | ||
| await umbracoApi.documentType.ensureNameNotExists(childOfChildDocumentTypeName); | ||
| await umbracoApi.document.ensureNameNotExists(childOfChildContentName); | ||
| }); | ||
|
|
||
| test('cannot publish child if the parent is not published', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| childDocumentTypeId = await umbracoApi.documentType.createDefaultDocumentType(childDocumentTypeName); | ||
| documentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNode(documentTypeName, childDocumentTypeId, true); | ||
| contentId = await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); | ||
| await umbracoApi.document.createDefaultDocumentWithParent(childContentName, childDocumentTypeId, contentId); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickCaretButtonForContentName(contentName); | ||
| await umbracoUi.content.clickActionsMenuForContent(childContentName); | ||
| await umbracoUi.content.clickPublishButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isErrorNotificationVisible(); | ||
| const contentData = await umbracoApi.document.getByName(childContentName); | ||
| expect(contentData.variants[0].state).toBe('Draft'); | ||
| }); | ||
|
|
||
| test('can publish with descendants', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| childDocumentTypeId = await umbracoApi.documentType.createDefaultDocumentType(childDocumentTypeName); | ||
| documentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNode(documentTypeName, childDocumentTypeId, true); | ||
| contentId = await umbracoApi.document.createDefaultDocument(contentName, documentTypeId); | ||
| await umbracoApi.document.createDefaultDocumentWithParent(childContentName, childDocumentTypeId, contentId); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickActionsMenuForContent(contentName); | ||
| await umbracoUi.content.clickPublishButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| const contentData = await umbracoApi.document.getByName(contentName); | ||
| expect(contentData.variants[0].state).toBe('Published'); | ||
| const childContentData = await umbracoApi.document.getByName(contentName); | ||
| expect(childContentData.variants[0].state).toBe('Published'); | ||
| }); | ||
| }); | ||
165 changes: 165 additions & 0 deletions
165
tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/Content.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| import {ConstantHelper, test} from '@umbraco/playwright-testhelpers'; | ||
| import {expect} from "@playwright/test"; | ||
|
|
||
| // Remove smoke tag before merging | ||
| test.describe('Content tests', {tag: '@smoke'}, () => { | ||
| let documentTypeId = ''; | ||
| let contentId = ''; | ||
| const contentName = 'TestContent'; | ||
| const documentTypeName = 'TestDocumentTypeForContent'; | ||
| const dataTypeName = 'Textstring'; | ||
| const contentText = 'This is test content text'; | ||
|
|
||
| test.beforeEach(async ({umbracoApi}) => { | ||
| await umbracoApi.documentType.ensureNameNotExists(documentTypeName); | ||
| }); | ||
|
|
||
| test.afterEach(async ({umbracoApi}) => { | ||
| await umbracoApi.document.ensureNameNotExists(contentName); | ||
| await umbracoApi.documentType.ensureNameNotExists(documentTypeName); | ||
| }); | ||
|
|
||
| test('can create empty content', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| const expectedState = 'Draft'; | ||
| await umbracoApi.documentType.createDefaultDocumentTypeWithAllowAsRoot(documentTypeName); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickActionsMenuAtRoot(); | ||
| await umbracoUi.content.clickCreateButton(); | ||
| await umbracoUi.content.chooseDocumentType(documentTypeName); | ||
| await umbracoUi.content.enterContentName(contentName); | ||
| await umbracoUi.content.clickSaveButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| expect(await umbracoApi.document.doesNameExist(contentName)).toBeTruthy(); | ||
| const contentData = await umbracoApi.document.getByName(contentName); | ||
| expect(contentData.variants[0].state).toBe(expectedState); | ||
| }); | ||
|
|
||
| test('can save and publish empty content', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| const expectedState = 'Published'; | ||
| await umbracoApi.documentType.createDefaultDocumentTypeWithAllowAsRoot(documentTypeName); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickActionsMenuAtRoot(); | ||
| await umbracoUi.content.clickCreateButton(); | ||
| await umbracoUi.content.chooseDocumentType(documentTypeName); | ||
| await umbracoUi.content.enterContentName(contentName); | ||
| await umbracoUi.content.clickSaveAndPublishButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.doesSuccessNotificationsHaveCount(2); | ||
| expect(await umbracoApi.document.doesNameExist(contentName)).toBeTruthy(); | ||
| const contentData = await umbracoApi.document.getByName(contentName); | ||
| expect(contentData.variants[0].state).toBe(expectedState); | ||
| }); | ||
|
|
||
| test('can create content', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName); | ||
| await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, dataTypeName, dataTypeData.id); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickActionsMenuAtRoot(); | ||
| await umbracoUi.content.clickCreateButton(); | ||
| await umbracoUi.content.chooseDocumentType(documentTypeName); | ||
| await umbracoUi.content.enterContentName(contentName); | ||
| await umbracoUi.content.enterTextstring(contentText); | ||
| await umbracoUi.content.clickSaveButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| expect(await umbracoApi.document.doesNameExist(contentName)).toBeTruthy(); | ||
| const contentData = await umbracoApi.document.getByName(contentName); | ||
| expect(contentData.values[0].value).toBe(contentText); | ||
| }); | ||
|
|
||
| test('can rename content', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| const wrongContentName = 'Wrong Content Name'; | ||
| documentTypeId = await umbracoApi.documentType.createDefaultDocumentTypeWithAllowAsRoot(documentTypeName); | ||
| contentId = await umbracoApi.document.createDefaultDocument(wrongContentName, documentTypeId); | ||
| expect(await umbracoApi.document.doesNameExist(wrongContentName)).toBeTruthy(); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.openContent(wrongContentName); | ||
| await umbracoUi.content.enterContentName(contentName); | ||
| await umbracoUi.content.clickSaveButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| const updatedContentData = await umbracoApi.document.get(contentId); | ||
| expect(updatedContentData.variants[0].name).toEqual(contentName); | ||
| }); | ||
|
|
||
| test('can update content', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| const wrongContentText = 'This is wrong test content text'; | ||
| const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName); | ||
| documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, dataTypeName, dataTypeData.id); | ||
| contentId = await umbracoApi.document.createDocumentWithTextContent(contentName, documentTypeId, wrongContentText, dataTypeName); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.openContent(contentName); | ||
| await umbracoUi.content.enterTextstring(contentText); | ||
| await umbracoUi.content.clickSaveButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| const updatedContentData = await umbracoApi.document.get(contentId); | ||
| expect(updatedContentData.variants[0].name).toEqual(contentName); | ||
| expect(updatedContentData.values[0].value).toBe(contentText); | ||
| }); | ||
|
|
||
| test('can publish content', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName); | ||
| documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, dataTypeName, dataTypeData.id); | ||
| contentId = await umbracoApi.document.createDocumentWithTextContent(contentName, documentTypeId, contentText, dataTypeName); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickActionsMenuForContent(contentName); | ||
| await umbracoUi.content.clickPublishButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| const contentData = await umbracoApi.document.getByName(contentName); | ||
| expect(contentData.variants[0].state).toBe('Published'); | ||
| }); | ||
|
|
||
| test('can unpublish content', async ({umbracoApi, umbracoUi}) => { | ||
| // Arrange | ||
| const dataTypeData = await umbracoApi.dataType.getByName(dataTypeName); | ||
| documentTypeId = await umbracoApi.documentType.createDocumentTypeWithPropertyEditor(documentTypeName, dataTypeName, dataTypeData.id); | ||
| contentId = await umbracoApi.document.createDocumentWithTextContent(contentName, documentTypeId, contentText, dataTypeName); | ||
| const publishData = {"publishSchedules":[{"culture":null}]}; | ||
| await umbracoApi.document.publish(contentId, publishData); | ||
| await umbracoUi.goToBackOffice(); | ||
| await umbracoUi.content.goToSection(ConstantHelper.sections.content); | ||
|
|
||
| // Act | ||
| await umbracoUi.content.clickActionsMenuForContent(contentName); | ||
| await umbracoUi.content.clickUnpublishButton(); | ||
| await umbracoUi.content.clickConfirmToUnpublishButton(); | ||
|
|
||
| // Assert | ||
| await umbracoUi.content.isSuccessNotificationVisible(); | ||
| const contentData = await umbracoApi.document.getByName(contentName); | ||
| expect(contentData.variants[0].state).toBe('Draft'); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.