Skip to content

Commit

Permalink
Cypress windows tests fix (#296) (#305)
Browse files Browse the repository at this point in the history
* [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]>
  • Loading branch information
amsiglan and jovancvetkovic3006 authored Jan 10, 2023
1 parent 4eca4e1 commit 79a73c0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Cypress.Commands.add('getTableFirstRow', (selector) => {
});

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

Cypress.Commands.add('waitForPageLoad', (url, { timeout = 10000, contains = null }) => {
Expand Down
2 changes: 2 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
// Import commands.js using ES2015 syntax:
import './commands';

import 'cypress-real-events';

// Alternatively you can use CommonJS syntax:
// require('./commands')

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"jest-cli": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"lint-staged": "^9.2.0",
"ts-loader": "^6.2.1"
"ts-loader": "^6.2.1",
"cypress-real-events": "1.7.6"
},
"engines": {
"yarn": "^1.21.1"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"compilerOptions": {
"skipLibCheck": true,
"esModuleInterop": true,
"outDir": "./target"
"outDir": "./target",
"types": ["cypress", "node", "cypress-real-events"]
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,11 @@ cyclist@^1.0.1:
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
integrity sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==

[email protected]:
version "1.7.6"
resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.7.6.tgz#6f17e0b2ceea1d6dc60f6737d8f84cc517bbbb4c"
integrity sha512-yP6GnRrbm6HK5q4DH6Nnupz37nOfZu/xn1xFYqsE2o4G73giPWQOdu6375QYpwfU1cvHNCgyD2bQ2hPH9D7NMw==

cypress@^6.0.0:
version "6.9.1"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-6.9.1.tgz#ce1106bfdc47f8d76381dba63f943447883f864c"
Expand Down

0 comments on commit 79a73c0

Please sign in to comment.