Skip to content

Commit e3f2d0a

Browse files
committed
chore: refine tests scripts after playwright integration
1 parent 058f6f0 commit e3f2d0a

8 files changed

Lines changed: 12 additions & 14 deletions

File tree

.github/workflows/build_verify.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ jobs:
1818
- name: eslint using npm run eslint
1919
run: |
2020
npm run lint
21-
- name: building Phoenix with npm run buildonly
21+
- name: building Phoenix with npm run build
2222
run: |
23-
npm run buildonly
24-
- name: Testing Phoenix with npm run test
25-
run: |
26-
npm run test
23+
npm run build

.github/workflows/playwright-chromium.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: chromium Run unit tests suite with Playwright Tests
1+
name: Chromium run unit tests suite with Playwright
22
on:
33
push:
44
branches: [ main ]

.github/workflows/playwright-firefox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: FireFox Run unit tests suite with Playwright Tests
1+
name: Firefox run unit tests suite with Playwright
22
on:
33
push:
44
branches: [ main ]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ IDEs from this link before raising a pull request: https://www.sonarlint.org/
7676
* The release artifacts to host will be in `dist` folder.
7777

7878
## Running tests
79-
* run `npm run test` in the terminal.
79+
* run `npm run zipTestFiles` in the terminal.
8080
* NB: this will setup all the required files for test
8181
* Use chrome/edge browser to navigate to Phoenix[http://localhost:8000/src/index.html](http://localhost:8000/src/index.html)
8282
* In Phoenix Menu, select `Debug > run Tests` To open the test runner.

gulpfile.js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ exports.releaseStaging = series(cleanDist, exports.build, makeDistNonJS, makeJSD
374374
exports.releaseProd = series(cleanDist, exports.build, makeDistNonJS, makeJSDist, releaseProd,
375375
createDistCacheManifest);
376376
exports.serve = series(exports.build, serve);
377-
exports.test = series(zipTestFiles);
377+
exports.zipTestFiles = series(zipTestFiles);
378378
exports.serveExternal = series(exports.build, serveExternal);
379379
exports.createJSDocs = series(cleanDocs, createJSDocs, generateDocIndex);
380380
exports.translateStrings = series(translateStrings);

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@
4747
"lint:fix": "eslint --quiet --fix src test",
4848
"prepare": "husky install",
4949
"serveTest": "http-server . -p 5000 -c-1",
50-
"test": "gulp test",
50+
"zipTestFiles": "gulp test",
51+
"test": "npx playwright test",
5152
"testChromium": "npx playwright test --project=chromium",
5253
"testFirefox": "npx playwright test --project=firefox",
5354
"buildonly": "gulp build",
5455
"vulnerabilityCheck": "echo Scanning for vulnarabilities && npm audit --prod",
55-
"build": "npm run buildonly && npm run createJSDocs && npm run test && npm run lint && npm run vulnerabilityCheck",
56+
"build": "npm run buildonly && npm run createJSDocs && npm run zipTestFiles && npm run lint && npm run vulnerabilityCheck",
5657
"clean": "gulp clean",
5758
"reset": "gulp reset",
5859
"release:dev": "gulp releaseDev",

test/SpecRunner.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<script type="text/javascript">
3131
//brackets.app.showDeveloperTools();
32-
console.warn('Make sure to run this following command before starting tests : npm run test ');
32+
console.warn('Make sure to run this following command before starting tests : npm run zipTestFiles ');
3333
</script>
3434

3535
<script>
@@ -208,7 +208,7 @@
208208
<button id="copyFullReportButton"> Copy Full Report</button>
209209
</div>
210210
<div id="loading" style="display: none; margin-top: 100px;">
211-
Please run <code>npm run test</code> before starting tests at least once or if you are facing issues.
211+
Please run <code>npm run zipTestFiles</code> before starting tests at least once or if you are facing issues.
212212
</p>Extracting test files <span id="loadProgressMessage"></span>.... <img src="../src/styles/images/throbber.gif" alt=".......">
213213
</div>
214214
<div id="mock-main-view" style="position:absolute; height:1000px; width:1000px; left:-10000px; top:-10000px;"></div>

test/SpecRunner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ define(function (require, exports, module) {
520520
let JSZip = require("thirdparty/jszip");
521521
window.JSZipUtils.getBinaryContent('test_folders.zip', function(err, data) {
522522
if(err) {
523-
alert("Please run 'npm run test' before starting this test. " +
523+
alert("Please run 'npm run zipTestFiles' before starting this test. " +
524524
"Could not create test files in phoenix virtual fs. Some tests may fail");
525525
_showLoading(false);
526526
init();

0 commit comments

Comments
 (0)