Skip to content

Commit a82125a

Browse files
Cypress windows tests fix (#296)
* [FEATURE] Detector must have at least one alert set #288 Signed-off-by: Jovan Cvetkovic <[email protected]> * [TASK] Investigate and fix cypress windows tests #295 Signed-off-by: Jovan Cvetkovic <[email protected]> * [TASK] Investigate and fix cypress windows tests #295 Signed-off-by: Jovan Cvetkovic <[email protected]> Signed-off-by: Jovan Cvetkovic <[email protected]>
1 parent f8efe78 commit a82125a

File tree

5 files changed

+2039
-39
lines changed

5 files changed

+2039
-39
lines changed

cypress/support/commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Cypress.Commands.add('getTableFirstRow', (selector) => {
9595
});
9696

9797
Cypress.Commands.add('triggerSearchField', (placeholder, text) => {
98-
cy.get(`[placeholder="${placeholder}"]`).type(`{selectall}${text}`).trigger('search');
98+
cy.get(`[placeholder="${placeholder}"]`).type(`{selectall}${text}`).realPress('Enter');
9999
});
100100

101101
Cypress.Commands.add('waitForPageLoad', (url, { timeout = 10000, contains = null }) => {

cypress/support/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// Import commands.js using ES2015 syntax:
1414
import './commands';
1515

16+
import 'cypress-real-events';
17+
1618
// Alternatively you can use CommonJS syntax:
1719
// require('./commands')
1820

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
"jest-cli": "^27.5.1",
6262
"jest-environment-jsdom": "^27.5.1",
6363
"lint-staged": "^9.2.0",
64-
"ts-loader": "^6.2.1"
64+
"ts-loader": "^6.2.1",
65+
"cypress-real-events": "1.7.6"
6566
},
6667
"engines": {
6768
"yarn": "^1.21.1"

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"compilerOptions": {
99
"skipLibCheck": true,
1010
"esModuleInterop": true,
11-
"outDir": "./target"
11+
"outDir": "./target",
12+
"types": ["cypress", "node", "cypress-real-events"]
1213
}
1314
}

0 commit comments

Comments
 (0)