Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix testcafe tests #5971

Merged
merged 11 commits into from
Oct 22, 2024
11 changes: 11 additions & 0 deletions .testcaferc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


module.exports = {
"browsers": [`chrome:${require("puppeteer").executablePath()}:headless`],
"nativeAutomation": "true",
"concurrency": 4,
"quarantineMode": {
"successThreshold": 1,
"attemptLimit": 5
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"eslint-plugin-react": "^7.25.1",
"husky": "^7.0.4",
"testcafe": "3.3.0",
"puppeteer": "23.5.3",
"get-func-name": "2.0.0",
"@types/lodash": "4.14.186"
}
Expand Down
12 changes: 1 addition & 11 deletions packages/survey-creator-angular/example/angular-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
{
"name": "survey-angular-ui-example",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^12.0.0",
"@angular/forms": "^12.0.0",
"@angular/core": "^12.0.0",
"@angular/cdk": "^12.0.0"
},
"devDependencies": {
"@types/node": "^16.11.10"
},
"dependencies": {
"@angular/router": "^12.0.0",
"bootstrap": "^3.3.7",
"survey-creator-angular": "../../build",
"surveyjs-widgets": "^1.9.40",
"tslib": "^2.3.0"
}
}
}
8 changes: 4 additions & 4 deletions packages/survey-creator-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"doc:gen": "node doc_generator/editor_docgenerator.js src/entries/index.ts",
"doc:update": "chmod +x docupdate_npm.sh && ./docupdate_npm.sh",
"testcafe": "testcafe chrome ../../testCafe/ --app \"http-server\" --selector-timeout 1500",
"testcafe:ci": "http-server --silent & testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 ../../testCafe/ --selector-timeout 1500 --reporter minimal",
"testcafe:ci": "http-server --silent & testcafe ../../testCafe/ --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"testcafe:file": "concurrently \"http-server --silent\" \"testcafe chrome ../../testCafe/designer/page-navigator.ts --reporter minimal --debug-mode\"",
"testcafe:a11y": "concurrently \"http-server --silent\" \"testcafe chrome ./testCafe/accessibility.js --selector-timeout 1500\"",
"testcafe:a11y:ci": "testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 ./testCafe/accessibility.js --app \"http-server\" --selector-timeout 1500 --reporter minimal",
"testcafe:a11y:ci": "testcafe ./testCafe/accessibility.js --app \"http-server\" --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"visual-regression-tests": "testcafe chrome --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal",
"visual-regression-tests:ci": "testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal",
"visual-regression-tests:ci": "testcafe --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"visual-regression-tests:file": "testcafe chrome:headless --disable-font-subpixel-positioning --app \"http-server\" ../../visualRegressionTests/tests/designer/pg-editors.ts --screenshots ../../ --reporter minimal --selector-timeout 1500",
"release": "standard-version --message \"Release: %s [azurepipelines skip]\"",
"remove-package-lock": "rimraf package-lock.json",
Expand Down Expand Up @@ -88,4 +88,4 @@
"survey-creator-core": "../survey-creator-core/build",
"survey-js-ui": "../../../survey-library/build/survey-js-ui"
}
}
}
8 changes: 4 additions & 4 deletions packages/survey-creator-knockout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"testcafe": "concurrently \"http-server --silent\" \"testcafe chrome ../../testCafe/ --selector-timeout 1500\"",
"testcafe:file": "concurrently \"http-server --silent\" \"testcafe chrome ../../testCafe/designer/page-navigator.ts --reporter minimal --selector-timeout 1500 --debug-mode\"",
"testcafe:a11y": "concurrently \"http-server --silent\" \"testcafe chrome ./testCafe/accessibility.js --selector-timeout 1500\"",
"testcafe:a11y:ci": "testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 ./testCafe/accessibility.js --app \"http-server\" --selector-timeout 1500 --reporter minimal",
"testcafe:ci": "http-server --silent & testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 ../../testCafe/ --selector-timeout 1500 --reporter minimal",
"testcafe:a11y:ci": "testcafe ./testCafe/accessibility.js --app \"http-server\" --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"testcafe:ci": "http-server --silent & testcafe ../../testCafe/ --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"visual-regression-tests": "testcafe chrome --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal",
"visual-regression-tests:ci": "testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal",
"visual-regression-tests:ci": "testcafe --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"visual-regression-tests:file": "testcafe chrome:headless --disable-font-subpixel-positioning --app \"http-server\" ../../visualRegressionTests/tests/designer/pg-choices.ts --screenshots ../../ --reporter minimal --selector-timeout 1500",
"release": "standard-version --message \"Release: %s [azurepipelines skip]\"",
"remove-package-lock": "rimraf package-lock.json",
Expand Down Expand Up @@ -92,4 +92,4 @@
"tag": true
}
}
}
}
8 changes: 4 additions & 4 deletions packages/survey-creator-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"doc:gen": "node doc_generator/editor_docgenerator.js src/entries/index.ts",
"doc:update": "chmod +x docupdate_npm.sh && ./docupdate_npm.sh",
"testcafe": "concurrently \"http-server --silent\" \"testcafe chrome ../../testCafe/ --selector-timeout 1500\"",
"testcafe:ci": "http-server --silent & testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 ../../testCafe/ --selector-timeout 1500 --reporter minimal",
"testcafe:ci": "http-server --silent & testcafe ../../testCafe/ --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"testcafe:file": "concurrently \"http-server --silent\" \"testcafe chrome ../../testCafe/designer/page-navigator.ts --reporter minimal --debug-mode\"",
"testcafe:a11y": "concurrently \"http-server --silent\" \"testcafe chrome ./testCafe/accessibility.js --selector-timeout 1500\"",
"testcafe:a11y:ci": "testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 ./testCafe/accessibility.js --app \"http-server\" --selector-timeout 1500 --reporter minimal",
"testcafe:a11y:ci": "testcafe ./testCafe/accessibility.js --app \"http-server\" --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"visual-regression-tests": "testcafe chrome --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal",
"visual-regression-tests:ci": "testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal",
"visual-regression-tests:ci": "testcafe --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"http-server\" --screenshots ../../ --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"visual-regression-tests:file": "testcafe chrome:headless --disable-font-subpixel-positioning --app \"http-server\" ../../visualRegressionTests/tests/designer/pg-editors.ts --screenshots ../../ --reporter minimal --selector-timeout 1500",
"release": "standard-version --message \"Release: %s [azurepipelines skip]\"",
"remove-package-lock": "rimraf package-lock.json",
Expand Down Expand Up @@ -96,4 +96,4 @@
"tag": true
}
}
}
}
6 changes: 3 additions & 3 deletions packages/survey-creator-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"remove-package-lock": "rimraf package-lock.json",
"release": "standard-version --message \"Release: %s [azurepipelines skip]\" ",
"lint": "eslint ./src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"visual-regression-tests:ci": "testcafe chrome:headless -c 4 -q attemptLimit=5,successThreshold=1 --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"npm run serve:example:prod\" --screenshots ../../ --selector-timeout 1500 --reporter minimal",
"visual-regression-tests:ci": "testcafe --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"npm run serve:example:prod\" --screenshots ../../ --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"visual-regression-tests": "testcafe chrome -c 4 -q attemptLimit=5,successThreshold=1 --disable-font-subpixel-positioning ../../visualRegressionTests/ --app \"npm run serve:example:prod\" --screenshots ../../ --selector-timeout 1500 --reporter minimal",
"testcafe:ci": "testcafe -c 4 -q attemptLimit=5,successThreshold=1 chrome:headless ../../testCafe/ --app \"npm run serve:example:prod\" --selector-timeout 1500 --reporter minimal",
"testcafe:ci": "testcafe ../../testCafe/ --app \"npm run serve:example:prod\" --selector-timeout 1500 --reporter minimal --config-file ../../.testcaferc.js",
"testcafe": "testcafe chrome ../../testCafe/ --app \"npm run serve:example:prod\" --selector-timeout 1500 --reporter minimal"
},
"devDependencies": {
Expand Down Expand Up @@ -51,4 +51,4 @@
"vue": "^3.2.41",
"vue-tsc": "^1.0.8"
}
}
}
4 changes: 2 additions & 2 deletions packages/survey-creator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"doc_gen": "node doc_generator/editor_docgenerator.js src/entries/index.ts",
"doc_update": "chmod +x docupdate_npm.sh && ./docupdate_npm.sh",
"testcafe": "concurrently \"http-server -p 7777\" \"testcafe chrome testCafe/\"",
"testcafe_ci": "http-server -p 7777 --silent & testcafe chrome:headless --reporter minimal,dashboard testCafe/",
"testcafe_ci": "http-server -p 7777 --silent & testcafe --reporter minimal,dashboard testCafe/ --config-file ../../.testcaferc.js",
"testcafe_file": "concurrently \"http-server -p 7777\" \"testcafe chrome testCafe/tests/adorners.js\"",
"release": "standard-version --message \"Release: %s [azurepipelines skip]\"",
"build_dev": "webpack --env.buildType dev --env.libraryName SurveyEditor && webpack --env.buildType dev",
Expand Down Expand Up @@ -83,4 +83,4 @@
"webpack-svgstore-plugin": "4.0.1",
"colors": "1.4.0"
}
}
}
Loading