-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from crt25/feature/CRT-24_load_submit_tasks
[CRT-24] [CRT-17] Enable solution submissions (+ preparation for scratch tasks)
- Loading branch information
Showing
112 changed files
with
7,605 additions
and
1,573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.hex filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,30 @@ | |
"name": "app-scratch", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "PORT=3101 craco start", | ||
"dev:coverage": "PORT=3101 COVERAGE=true craco start", | ||
"build": "craco build", | ||
"pretest": "shx rm -rf coverage/ .nyc_output/", | ||
"test": "yarn pretest && playwright test && yarn posttest", | ||
"test:local": "yarn pretest && SERVER_ALREADY_RUNS=true playwright test && yarn posttest", | ||
"test:debug": "SERVER_ALREADY_RUNS=true playwright test --debug --project='iPad Mini landscape'", | ||
"posttest": "nyc report", | ||
"eject": "react-scripts eject", | ||
"lint": "eslint '**/*.ts' '**/*.tsx' --ignore-pattern node_modules/", | ||
"extract:i18n": "formatjs extract 'src/{components,sections}/**/*.{js,ts,tsx}' --format crowdin --out-file content/locales/en.json", | ||
"compile:i18n": "formatjs compile-folder --ast --format crowdin content/locales content/compiled-locales", | ||
"i18n": "yarn extract:i18n && yarn compile:i18n", | ||
"prepublish": "node scripts/prepublish.mjs" | ||
}, | ||
"dependencies": { | ||
"@babel/core": "^7.25.2", | ||
"@babel/preset-env": "^7.25.4", | ||
"@craco/craco": "^7.1.0", | ||
"@emotion/react": "^11.13.3", | ||
"@emotion/styled": "^11.13.0", | ||
"@microbit/microbit-universal-hex": "^0.2.2", | ||
"@playwright/test": "^1.48.1", | ||
"@testing-library/jest-dom": "^5.17.0", | ||
"@testing-library/react": "^12.1.5", | ||
"@testing-library/user-event": "^13.5.0", | ||
|
@@ -15,6 +34,7 @@ | |
"@typescript-eslint/parser": "^8.6.0", | ||
"arraybuffer-loader": "^1.0.8", | ||
"autoprefixer": "^9.0.1", | ||
"babel-plugin-istanbul": "^7.0.0", | ||
"balance-text": "^3.3.1", | ||
"bowser": "^2.11.0", | ||
"buffer": "^6.0.3", | ||
|
@@ -32,10 +52,13 @@ | |
"get-user-media-promise": "1.1.4", | ||
"immutable": "^4.3.7", | ||
"js-base64": "^3.7.7", | ||
"jszip": "^3.10.1", | ||
"keymirror": "^0.1.1", | ||
"lodash.defaultsdeep": "^4.6.1", | ||
"omggif": "^1.0.10", | ||
"papaparse": "^5.4.1", | ||
"playwright": "^1.48.1", | ||
"playwright-test-coverage": "^1.2.12", | ||
"postcss": "^8.4.47", | ||
"postcss-import": "^12.0.0", | ||
"postcss-loader": "^4.3.0", | ||
|
@@ -50,8 +73,9 @@ | |
"react-intl-redux": "^2.4.1", | ||
"react-modal": "^3.16.1", | ||
"react-popover": "^0.5.10", | ||
"react-redux": "^5.0.1", | ||
"react-redux": "^8.1.3", | ||
"react-responsive": "^5.0.0", | ||
"react-router-dom": "^6.27.0", | ||
"react-scripts": "5.0.1", | ||
"react-style-proptype": "^3.2.2", | ||
"react-tabs": "^2.3.0", | ||
|
@@ -68,6 +92,7 @@ | |
"scratch-storage": "^2.3.255", | ||
"scratch-svg-renderer": "^2.4.15", | ||
"scratch-vm": "patch:scratch-vm@npm%3A4.6.29#~/.yarn/patches/scratch-vm-npm-4.6.29-f3a8bb62d5.patch", | ||
"shx": "^0.3.4", | ||
"stream-browserify": "^3.0.0", | ||
"style-loader": "^4.0.0", | ||
"to-style": "^1.3.3", | ||
|
@@ -83,18 +108,6 @@ | |
"@types/react": "16.14.61", | ||
"babel-preset-react-app@npm:^10.0.1": "patch:babel-preset-react-app@npm%3A10.0.1#~/.yarn/patches/babel-preset-react-app-npm-10.0.1-a9a19b630a.patch" | ||
}, | ||
"scripts": { | ||
"dev": "craco start", | ||
"build": "craco build", | ||
"test": "craco test", | ||
"test:cov": "craco test --coverage --watchAll=false --testPathIgnorePatterns=src/scratch", | ||
"eject": "react-scripts eject", | ||
"lint": "eslint '**/*.ts' '**/*.tsx' --ignore-pattern node_modules/", | ||
"extract:i18n": "formatjs extract 'src/{components,sections}/**/*.{js,ts,tsx}' --format crowdin --out-file content/locales/en.json", | ||
"compile:i18n": "formatjs compile-folder --ast --format crowdin content/locales content/compiled-locales", | ||
"i18n": "yarn extract:i18n && yarn compile:i18n", | ||
"prepublish": "node scripts/prepublish.mjs" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app", | ||
|
@@ -122,6 +135,52 @@ | |
"__tests__", | ||
"\\.d\\.ts$", | ||
"\\.spec\\.(t|j)sx?$" | ||
], | ||
"moduleNameMapper": { | ||
"@scratch-submodule/(.*)": "<rootDir>/src/scratch/$1", | ||
"!ify-loader!(.*)": "<rootDir>/node_modules/$1", | ||
"!arraybuffer-loader!(.*)": "<rootDir>/src/tests/binary.ts", | ||
"!raw-loader!(.*)": "<rootDir>/src/tests/binary.ts", | ||
"!base64-loader!(.*)": "<rootDir>/src/tests/binary.ts" | ||
} | ||
}, | ||
"nyc": { | ||
"all": true, | ||
"parserPlugins": [ | ||
"typescript", | ||
"jsx", | ||
"asyncGenerators", | ||
"bigInt", | ||
"classProperties", | ||
"classPrivateProperties", | ||
"classPrivateMethods", | ||
"dynamicImport", | ||
"importMeta", | ||
"numericSeparator", | ||
"objectRestSpread", | ||
"optionalCatchBinding", | ||
"topLevelAwait" | ||
], | ||
"extensions": [ | ||
".ts", | ||
".tsx" | ||
], | ||
"include": [ | ||
"src/**/*" | ||
], | ||
"exclude": [ | ||
"**/*.config.js", | ||
"**/*.d.ts", | ||
"**/node_modules/**/*", | ||
"**/__mocks__/**/*", | ||
"**/__tests__/**/*", | ||
"src/scratch/**/*", | ||
"src/setupTests.ts", | ||
"src/tests/**/*" | ||
], | ||
"reporter": [ | ||
"lcov", | ||
"text" | ||
] | ||
}, | ||
"packageManager": "[email protected]", | ||
|
@@ -147,6 +206,7 @@ | |
"@types/react-responsive": "^8.0.8", | ||
"@types/react-tabs": "^2.3.0", | ||
"@types/react-virtualized": "^9", | ||
"@types/wav-encoder": "^1" | ||
"@types/wav-encoder": "^1", | ||
"nyc": "^17.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { defineConfig, devices, PlaywrightTestConfig } from "@playwright/test"; | ||
|
||
const config: PlaywrightTestConfig = { | ||
// ignore the scratch submodules | ||
testIgnore: "**src/scratch/**/*", | ||
|
||
projects: [ | ||
{ | ||
name: "Desktop", | ||
use: devices["Desktop Chrome"], | ||
}, | ||
{ | ||
name: "iPad Mini landscape", | ||
use: { | ||
...devices["iPad Mini landscape"], | ||
// override the browser, webkit does not seem to support audio in playwright | ||
browserName: "chromium", | ||
}, | ||
}, | ||
], | ||
|
||
use: { | ||
baseURL: "http://localhost:3101", | ||
}, | ||
}; | ||
|
||
// eslint-disable-next-line no-undef | ||
if (!process.env.SERVER_ALREADY_RUNS) { | ||
config.webServer = { | ||
// Run your local dev server before starting the tests. | ||
command: "yarn dev:coverage", | ||
url: "http://localhost:3101", | ||
timeout: 120 * 1000, | ||
}; | ||
} | ||
|
||
export default defineConfig(config); |
Oops, something went wrong.