Skip to content

Commit f3668e0

Browse files
authored
Fix: Form elements in thirdparty dashboard views get removed (#14152)
1 parent b3d580d commit f3668e0

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

src/Umbraco.Web.UI.Client/src/views/common/dashboard.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div ng-controller="Umbraco.DashboardController">
22

3-
<form name="dashboardForm" val-form-manager>
3+
<ng-form name="dashboardForm" val-form-manager>
44

55
<umb-load-indicator ng-show="page.loading"></umb-load-indicator>
66

@@ -32,6 +32,6 @@
3232

3333
</div>
3434

35-
</form>
35+
</ng-form>
3636

3737
</div>

tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ test.describe('Tabs', () => {
4646
await openDocTypeFolder(umbracoUi, page);
4747
}
4848

49+
test.only('Click dashboard tabs', async ({umbracoUi, page}) => {
50+
await umbracoUi.goToSection('content');
51+
await page.locator('[data-element="tab-contentRedirectManager"] > button').click();
52+
expect(page.locator('.redirecturlsearch')).not.toBeNull();
53+
await page.locator('[data-element="tab-contentIntro"] > button').click();
54+
await expect(page.locator('[data-element="tab-contentIntro"]')).toHaveClass('umb-tab ng-scope umb-tab--active');
55+
});
56+
4957
test('Create tab', async ({umbracoUi, umbracoApi, page}) => {
5058
await umbracoApi.documentTypes.ensureNameNotExists(tabsDocTypeName);
5159
await umbracoApi.content.deleteAllContent();
@@ -67,7 +75,7 @@ test.describe('Tabs', () => {
6775
await umbracoUi.waitForTreeLoad('settings');
6876

6977
await umbracoUi.clickElement(umbracoUi.getTreeItem("settings", ["Document Types", tabsDocTypeName]))
70-
// Create a tab
78+
// Create a tab
7179
await page.locator('.umb-group-builder__tabs__add-tab').click();
7280
await page.locator('ng-form.ng-invalid > .umb-group-builder__group-title-input').fill('Tab 1');
7381
// Create a 2nd tab manually
@@ -178,7 +186,7 @@ test.describe('Tabs', () => {
178186
await expect(await page.locator('[title=urlPicker]')).toHaveCount(0);
179187
});
180188

181-
test('Reorders tab', async ({umbracoUi, umbracoApi, page}) => {
189+
test('Reorders tab', async ({umbracoUi, umbracoApi, page}) => {
182190
await umbracoApi.documentTypes.ensureNameNotExists(tabsDocTypeName);
183191

184192
const tabsDocType = new DocumentTypeBuilder()
@@ -485,24 +493,24 @@ test.describe('Tabs', () => {
485493
await openDocTypeFolder(umbracoUi, page);
486494
await page.locator('[alias="reorder"]').click();
487495
await page.locator('.umb-group-builder__tab').last().click();
488-
496+
489497
// Drag and drop property from tab 2 into tab 1
490498
await page.locator('.umb-group-builder__property-meta > .flex > .icon >> nth=1').last().hover();
491499
await page.mouse.down();
492500
await page.locator('.umb-group-builder__tab >> nth=1').hover({force:true});
493501
await page.waitForTimeout(500);
494502
await page.locator('[data-element="group-Tab group"]').hover({force:true});
495503
await page.mouse.up();
496-
504+
497505
// Stop reordering and save
498506
await page.locator('[alias="reorder"]').click();
499507
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey(ConstantHelper.buttons.save));
500-
508+
501509
// Assert
502510
await umbracoUi.isSuccessNotificationVisible();
503511
await expect(await page.locator('[title="urlPickerTabTwo"]')).toBeVisible();
504512
});
505-
513+
506514
test('Drags and drops a group and converts to tab', async ({umbracoUi, umbracoApi, page}) => {
507515
await umbracoApi.documentTypes.ensureNameNotExists(tabsDocTypeName);
508516
const tabsDocType = new DocumentTypeBuilder()
@@ -552,4 +560,4 @@ test.describe('Tabs', () => {
552560
await umbracoUi.isSuccessNotificationVisible();
553561
await expect(await page.locator('[title="tabGroup"]').first()).toBeVisible();
554562
});
555-
});
563+
});

0 commit comments

Comments
 (0)