Skip to content

Commit

Permalink
LPD-36442 Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
NemethNorbert authored and brianchandotcom committed Sep 18, 2024
1 parent dd5d589 commit e8f4fc5
Showing 1 changed file with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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(
Expand Down

0 comments on commit e8f4fc5

Please sign in to comment.