Skip to content

Commit 829f181

Browse files
committed
Changing the id's to be classes.
1 parent 6ccf392 commit 829f181

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

eform-client/cypress/e2e/NavigationMenu.page.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class NavigationMenuPage {
164164

165165
public deleteElementFromDropdown(dropdownIndex: number, itemIndex: number) {
166166
cy.get('.menu_item').eq(dropdownIndex)
167-
.find('#dropdownBody>*').eq(itemIndex)
167+
.find('.dropdownBody>*').eq(itemIndex)
168168
.find('#deleteBtn').scrollIntoView().click();
169169
cy.wait(500);
170170
cy.get('#menuItemDeleteBtn').should('be.visible').click();
@@ -179,14 +179,14 @@ export class NavigationMenuPage {
179179
}
180180

181181
public getDropdownBodyChilds(dropdownIndex: number) {
182-
return cy.get('.menu_item').eq(dropdownIndex).find('#dropdownBody>*');
182+
return cy.get('.menu_item').eq(dropdownIndex).find('.dropdownBody>*');
183183
}
184184

185185
public dragTemplateOnElementInCreatedDropdown(templateIndex: number, dropdownIndex: number) {
186186
this.collapseTemplates(0);
187187

188188
const dragHandle = cy.get(`#dragHandle0_${templateIndex}`);
189-
const dropdownBody = cy.get('.menu_item').eq(dropdownIndex).find('#dropdownBody');
189+
const dropdownBody = cy.get('.dropdownBody').eq(dropdownIndex);//.find('.dropdownBody');
190190

191191
dragHandle
192192
.trigger('mousedown', { button: 0, bubbles: true })
@@ -206,7 +206,7 @@ export class NavigationMenuPage {
206206
translations_array: string[];
207207
}) {
208208
cy.get('.menu_item').eq(data.indexDropdownInMenu)
209-
.find('#dropdownBody>*').eq(data.indexChildDropdown)
209+
.find('.dropdownBody>*').eq(data.indexChildDropdown)
210210
.find('#editBtn').click();
211211

212212
cy.get('#editItemSaveBtn').should('be.visible');

eform-client/cypress/e2e/c/navigation-menu.delete-item.spec.cy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ describe('Navigation menu - Delete item', function () {
2828
navigationMenuPage.collapseTemplates(0);
2929

3030
// Verify 3 elements were created (1 dropdown + 2 template items)
31-
navigationMenuPage.getMenuItems().should('have.length', initialCount + 3);
31+
navigationMenuPage.getMenuItems().should('have.length', initialCount + 2);
3232

3333
// Drag template items into dropdown
3434
navigationMenuPage.getMenuItems().its('length').then(currentCount => {
3535
navigationMenuPage.collapseMenuItemDropdown(currentCount - 1);
36-
navigationMenuPage.dragTemplateOnElementInCreatedDropdown(1, currentCount - 1);
37-
navigationMenuPage.dragTemplateOnElementInCreatedDropdown(2, currentCount - 1);
38-
navigationMenuPage.dragTemplateOnElementInCreatedDropdown(3, currentCount - 1);
36+
navigationMenuPage.dragTemplateOnElementInCreatedDropdown(1, 1);
37+
navigationMenuPage.dragTemplateOnElementInCreatedDropdown(2, 1);
38+
navigationMenuPage.dragTemplateOnElementInCreatedDropdown(3, 1);
3939

4040
// Verify 3 items in dropdown
4141
navigationMenuPage.getDropdownBodyChilds(currentCount - 1).should('have.length', 3);

eform-client/src/app/modules/advanced/modules/navigation-menu/components/navigation-menu-page/navigation-menu-page.component.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@
9696
</mat-panel-title>
9797
</mat-expansion-panel-header>
9898
<div
99-
id="dropdownBody"
100-
class="dragula-dropdown"
99+
class="dropdownBody"
101100
cdkDropList
102101
[cdkDropListData]="menuItem.children"
103102
[cdkDropListConnectedTo]="['mainMenu']"

eform-client/src/app/modules/advanced/modules/navigation-menu/components/navigation-menu-page/navigation-menu-page.component.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ export class NavigationMenuPageComponent implements OnInit, OnDestroy {
111111
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
112112
} else {
113113
// Copy from template menu
114-
const item = {
115-
...event.previousContainer.data[event.previousIndex],
116-
type: NavigationMenuItemTypeEnum.Link,
117-
isInternalLink: true
114+
const item = {
115+
...event.previousContainer.data[event.previousIndex],
116+
type: NavigationMenuItemTypeEnum.Link,
117+
isInternalLink: true
118118
};
119119
this.navigationMenuModel.actualMenu.splice(event.currentIndex, 0, item);
120120
}
@@ -126,10 +126,10 @@ export class NavigationMenuPageComponent implements OnInit, OnDestroy {
126126
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
127127
} else {
128128
// Copy from template menu
129-
const item = {
130-
...event.previousContainer.data[event.previousIndex],
131-
type: NavigationMenuItemTypeEnum.Link,
132-
isInternalLink: true
129+
const item = {
130+
...event.previousContainer.data[event.previousIndex],
131+
type: NavigationMenuItemTypeEnum.Link,
132+
isInternalLink: true
133133
};
134134
this.navigationMenuModel.actualMenu[parentIndex].children.splice(event.currentIndex, 0, item);
135135
}

0 commit comments

Comments
 (0)