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

Commit ca32c3c

Browse files
committed
chore: refactor to hopefully fix flaky Cypress tests
1 parent 6d2a2c4 commit ca32c3c

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<div id="demo-container" class="container-fluid">
22
<h2>
3-
{{ title }}
4-
3+
Example 30: Composite Editor Modal
54
<span class="float-end">
65
<a
76
style="font-size: 18px"
@@ -24,7 +23,14 @@ <h2>
2423
<span>Toggle Dark Mode</span>
2524
</button>
2625
</h2>
27-
<div class="subtitle" [innerHTML]="subTitle"></div>
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>
2834

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

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ 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-
9692
angularGrid!: AngularGridInstance;
9793
compositeEditorInstance!: SlickCompositeEditorComponent;
9894
gridOptions!: GridOption;

src/styles.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ section {
190190
background-color: #fff;
191191
/* the height is 100% minus the 2 navbars */
192192
height: calc(100vh - 56px);
193-
padding: 0 10px;
193+
padding: 0 20px;
194+
195+
#demo-container {
196+
padding-bottom: 15px;
197+
}
194198

195199
h3 {
196200
color: #333;

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();
123+
cy.get('#grid27').find('button.slick-grid-menu-button').click({ force: true });
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');
50+
cy.get('@title-column').find('.mdi-alert-outline').trigger('mouseover', { force: true });
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)