Assert that the item is loaded before trying to click rollback
This commit is contained in:
@@ -295,7 +295,9 @@ test.describe('Content tests', () => {
|
||||
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey(ConstantHelper.buttons.rollback));
|
||||
// Not a very nice selector, but there's sadly no alternative :(
|
||||
await page.locator('.-selectable.cursor-pointer').first().click();
|
||||
// Sadly can't use the button by label key here since there's another one in the DOM
|
||||
// Sadly can't use the button by label key here since there's another one in the DOM
|
||||
const helpText = await page.locator('[key="rollback_diffHelp"]');
|
||||
await expect(helpText).toBeVisible();
|
||||
await page.locator('[action="vm.rollback()"]').click();
|
||||
|
||||
await umbracoUi.refreshContentTree();
|
||||
@@ -664,10 +666,10 @@ test.describe('Content tests', () => {
|
||||
.build();
|
||||
|
||||
const alias = AliasHelper.toAlias(name);
|
||||
|
||||
|
||||
// Save grid and get the ID
|
||||
const dataType = await umbracoApi.dataTypes.save(grid)
|
||||
|
||||
|
||||
// Create a document type using the data type
|
||||
const docType = new DocumentTypeBuilder()
|
||||
.withName(name)
|
||||
@@ -691,7 +693,7 @@ test.describe('Content tests', () => {
|
||||
.build();
|
||||
|
||||
await umbracoApi.content.save(contentNode);
|
||||
|
||||
|
||||
// Ugly wait but we have to wait for cache to rebuild
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
@@ -720,7 +722,7 @@ test.describe('Content tests', () => {
|
||||
// Save and publish
|
||||
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey(ConstantHelper.buttons.saveAndPublish));
|
||||
await umbracoUi.isSuccessNotificationVisible();
|
||||
|
||||
|
||||
const expected = `
|
||||
<div class="umb-grid">
|
||||
<div class="grid-section">
|
||||
|
||||
Reference in New Issue
Block a user