From e8f4fc59dd2c30396e5a5c06edcdbfc1af9f2bde Mon Sep 17 00:00:00 2001 From: NemethNorbert Date: Fri, 13 Sep 2024 17:48:46 +0200 Subject: [PATCH] LPD-36442 Add test --- .../journalArticleAutosave.spec.ts | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/modules/test/playwright/tests/journal-web/journalArticleAutosave.spec.ts b/modules/test/playwright/tests/journal-web/journalArticleAutosave.spec.ts index 940edada1546dd..202a725d852ee8 100644 --- a/modules/test/playwright/tests/journal-web/journalArticleAutosave.spec.ts +++ b/modules/test/playwright/tests/journal-web/journalArticleAutosave.spec.ts @@ -10,6 +10,7 @@ import {applicationsMenuPageTest} from '../../fixtures/applicationsMenuPageTest' import {featureFlagsTest} from '../../fixtures/featureFlagsTest'; import {isolatedSiteTest} from '../../fixtures/isolatedSiteTest'; import {loginTest} from '../../fixtures/loginTest'; +import {pagesAdminPagesTest} from '../../fixtures/pagesAdminPagesTest'; import {clickAndExpectToBeVisible} from '../../utils/clickAndExpectToBeVisible'; import fillAndClickOutside from '../../utils/fillAndClickOutside'; import getRandomString from '../../utils/getRandomString'; @@ -35,7 +36,40 @@ const autoSaveTest = mergeTests( }), isolatedSiteTest, journalPagesTest, - loginTest() + loginTest(), + pagesAdminPagesTest +); + +autoSaveTest( + 'UndoRedo Should not appear when editing default values', + { + tag: '@LPD-36442', + }, + async ({ + apiHelpers, + journalEditArticlePage, + journalEditStructureDefaultValuesPage, + site, + }) => { + const fieldName = 'Text1'; + const structureName = 'Structure1'; + + const dataDefinition = getDataStructureDefinition({ + defaultLanguageId: 'en_US', + fields: [{name: fieldName, repeatable: true}], + name: structureName, + }); + + await apiHelpers.dataEngine.createStructure(site.id, dataDefinition); + + await journalEditStructureDefaultValuesPage.goto({ + siteUrl: site.friendlyUrlPath, + structureName, + }); + + expect(journalEditArticlePage.undoButton).not.toBeVisible(); + expect(journalEditArticlePage.redoButton).not.toBeVisible(); + } ); autoSaveTest(