Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 2a8bd14

Browse files
committed
chore: rollback changes to hopefully pass Cypress tests
1 parent ca32c3c commit 2a8bd14

File tree

6 files changed

+12
-28
lines changed

6 files changed

+12
-28
lines changed

src/app/examples/grid-composite-editor.component.html

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<div id="demo-container" class="container-fluid">
22
<h2>
3-
Example 30: Composite Editor Modal
3+
{{ title }}
4+
45
<span class="float-end">
56
<a
67
style="font-size: 18px"
@@ -14,7 +15,7 @@ <h2>
1415
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
1516
type="button"
1617
data-test="toggle-subtitle"
17-
(click)="toggleSubTitle()"
18+
(click)="hideSubTitle = !hideSubTitle"
1819
>
1920
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
2021
</button>
@@ -23,14 +24,7 @@ <h2>
2324
<span>Toggle Dark Mode</span>
2425
</button>
2526
</h2>
26-
<div class="subtitle">
27-
Composite Editor allows you to Create, Clone, Edit, Mass Update & Mass Selection Changes inside a nice Modal Window.
28-
<br />The modal is simply populated by looping through your column definition list and also uses a lot of the same logic as
29-
inline editing (see
30-
<a href="https://ghiscoding.gitbook.io/angular-slickgrid/grid-functionalities/composite-editor-modal" target="_blank"
31-
>Composite Editor - Wiki</a
32-
>.)
33-
</div>
27+
<div class="subtitle" [hidden]="hideSubTitle" [innerHTML]="subTitle"></div>
3428

3529
<div class="mb-2">
3630
<div class="btn-group btn-group-sm" role="group" aria-label="Basic Editing Commands">

src/app/examples/grid-composite-editor.component.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ const myCustomTitleValidator = (value: any, args: any) => {
8989
})
9090
export class GridCompositeEditorComponent implements OnDestroy, OnInit {
9191
private _darkMode = false;
92+
title = 'Example 30: Composite Editor Modal';
93+
subTitle = `Composite Editor allows you to Create, Clone, Edit, Mass Update & Mass Selection Changes inside a nice Modal Window.
94+
<br>The modal is simply populated by looping through your column definition list and also uses a lot of the same logic as inline editing (see <a href="https://ghiscoding.gitbook.io/angular-slickgrid/grid-functionalities/composite-editor-modal" target="_blank">Composite Editor - Wiki</a>.)`;
95+
9296
angularGrid!: AngularGridInstance;
9397
compositeEditorInstance!: SlickCompositeEditorComponent;
9498
gridOptions!: GridOption;
@@ -1068,11 +1072,4 @@ export class GridCompositeEditorComponent implements OnDestroy, OnInit {
10681072
<span class="autocomplete-bottom-right">Type: <b>${item.itemTypeName === 'I' ? 'Item' : item.itemTypeName === 'C' ? 'PdCat' : 'Cat'}</b></span>
10691073
</div>`;
10701074
}
1071-
1072-
toggleSubTitle() {
1073-
this.hideSubTitle = !this.hideSubTitle;
1074-
const action = this.hideSubTitle ? 'add' : 'remove';
1075-
document.querySelector('.subtitle')?.classList[action]('hidden');
1076-
this.angularGrid.resizerService.resizeGrid(2);
1077-
}
10781075
}

src/app/examples/grid-graphql-nopage.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ <h2>
1414
class="ms-2 btn btn-outline-secondary btn-sm btn-icon"
1515
type="button"
1616
data-test="toggle-subtitle"
17-
(click)="toggleSubTitle()"
17+
(click)="hideSubTitle = !hideSubTitle"
1818
>
1919
<span class="mdi mdi-information-outline" title="Toggle example sub-title details"></span>
2020
</button>
2121
</h2>
2222
<div class="subtitle row">
23-
<div class="col-12" [innerHTML]="subTitle"></div>
23+
<div class="col-12" [hidden]="hideSubTitle" [innerHTML]="subTitle"></div>
2424
</div>
2525

2626
<div class="row">

src/app/examples/grid-graphql-nopage.component.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,4 @@ export class GridGraphqlWithoutPaginationComponent implements OnInit {
288288
const languageQuery = `query { languages { code, name, native }}`;
289289
return this.http.post<GraphqlResult<{ code: string; name: string; native: string }>>(COUNTRIES_API, { query: languageQuery });
290290
}
291-
292-
toggleSubTitle() {
293-
this.hideSubTitle = !this.hideSubTitle;
294-
const action = this.hideSubTitle ? 'add' : 'remove';
295-
document.querySelector('.subtitle')?.classList[action]('hidden');
296-
this.angularGrid.resizerService.resizeGrid(2);
297-
}
298291
}

test/cypress/e2e/example27.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('Example 27 - GraphQL Basic API without Pagination', () => {
120120
});
121121

122122
it('should Clear all Filters and expect all rows to be back', () => {
123-
cy.get('#grid27').find('button.slick-grid-menu-button').click({ force: true });
123+
cy.get('#grid27').find('button.slick-grid-menu-button').click();
124124

125125
cy.get(`.slick-grid-menu:visible`).find('.slick-menu-item').first().find('span').contains('Clear all Filters').click();
126126

test/cypress/e2e/example30.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('Example 30 Composite Editor Modal', () => {
4747

4848
it('should display 2 different tooltips when hovering icons on "Title" column', () => {
4949
cy.get('.slick-column-name').as('title-column');
50-
cy.get('@title-column').find('.mdi-alert-outline').trigger('mouseover', { force: true });
50+
cy.get('@title-column').find('.mdi-alert-outline').trigger('mouseover');
5151

5252
cy.get('.slick-custom-tooltip').should('be.visible');
5353
cy.get('.slick-custom-tooltip .tooltip-body').contains('Task must always be followed by a number');

0 commit comments

Comments
 (0)