Skip to content

Commit 79a73c0

Browse files
Cypress windows tests fix (#296) (#305)
* [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]> Signed-off-by: Jovan Cvetkovic <[email protected]> Co-authored-by: Jovan Cvetkovic <[email protected]>
1 parent 4eca4e1 commit 79a73c0

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
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
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,6 +2041,11 @@ cyclist@^1.0.1:
20412041
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
20422042
integrity sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==
20432043

2044+
2045+
version "1.7.6"
2046+
resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.7.6.tgz#6f17e0b2ceea1d6dc60f6737d8f84cc517bbbb4c"
2047+
integrity sha512-yP6GnRrbm6HK5q4DH6Nnupz37nOfZu/xn1xFYqsE2o4G73giPWQOdu6375QYpwfU1cvHNCgyD2bQ2hPH9D7NMw==
2048+
20442049
cypress@^6.0.0:
20452050
version "6.9.1"
20462051
resolved "https://registry.yarnpkg.com/cypress/-/cypress-6.9.1.tgz#ce1106bfdc47f8d76381dba63f943447883f864c"

0 commit comments

Comments
 (0)