From 1d3d80f6beccb867ef5fb87f6c4ec5d4fa9fa636 Mon Sep 17 00:00:00 2001 From: Shachar <34343793+ShaMan123@users.noreply.github.com> Date: Sun, 23 Jul 2023 12:00:15 +0530 Subject: [PATCH] docs(): revise test section (#9114) --- .github/ISSUE_TEMPLATE/config.yml | 9 +++++++ CHANGELOG.md | 1 + CONTRIBUTING.md | 41 +++++++++++++++++++------------ 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 2dc5ffecc74..040fa68c924 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -14,6 +14,15 @@ contact_links: - name: GOTCHAS url: http://fabricjs.com/fabric-gotchas about: Refer to the list of known pitfalls before assuming a bug. + - name: Vanilla Demo + url: https://codesandbox.io/p/sandbox/fabric-vanillajs-sandbox-forked-e5r48u?file=%2FREADME.md + about: Vanilla demo. + - name: Next.js Demo + url: https://codesandbox.io/p/sandbox/fabric-nextjs-sandbox-forked-h6qdh3?file=%2FREADME.md + about: Next.js demo. + - name: Node Demo + url: https://codesandbox.io/p/sandbox/fabric-node-sandbox-forked-xewlhg?file=%2FREADME.md + about: Node demo. - name: Security url: ./Security.md about: Please report security vulnerabilities here. diff --git a/CHANGELOG.md b/CHANGELOG.md index 98b8457c8ed..22169a1b92f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [next] +- docs(): revise test section [#9114](https://github.com/fabricjs/fabric.js/pull/9114) - fix(): #8344 stroke projection [#8374](https://github.com/fabricjs/fabric.js/pull/8374) - fix(Filters) Removing type from the options passed in the constructor [#9089](https://github.com/fabricjs/fabric.js/pull/9089) - feat(InteractiveObject): add `getActiveControl()` to expose `__corner` [#9102](https://github.com/fabricjs/fabric.js/pull/9102) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0eed870169d..c2cafb17536 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,6 +64,8 @@ Answering questions and addressing issues, as well as fixing and adding types (s ### 🎮 Adding a DEMO (currently not possible) +**New website is under construction. Contributions are welcome.** + Take a look at an existing [demo file][demo_file].\ Create a new file in the same directory (`posts/demos/_posts`) and follow [**developing the website**](#fabricjscom-deprecated). @@ -104,11 +106,12 @@ Fabric is an open source project 🦄 and as such depends on the **genuine effor Do not reorder imports. Irrelevant changes in a PR that are not created by prettier aren't needed nor welcome. - **Tests** \ PRs must be backed with relevant tests, follow [TESTING](#-testing). If you never wrote a test or you find our tests unclear to extend, just ask for help. + Aim to cover 100% of the changes. - **Docs** \ Add relevant comments to your code if necessary using [JSDoc 3][jsdoc] and update relevant guides.\ The generated documentation can be found at [fabricjs.com][docs], see [DOCS](#-improving-docs). - **Changelog**\ - Add a concise listing to the [**CHANGELOG**](CHANGELOG.md) describing what has changed. + Add a concise listing to the [**CHANGELOG**](CHANGELOG.md) describing what has changed or let github actions add the PR title for you. - **1️⃣ PR per feature/bug** \ Create a new branch for every pull request.\ If you want to do more than one thing, create multiple pull requests 💪. @@ -125,19 +128,33 @@ It is more than likely you will be requested to change stuff and refine your wor [![🧪](../../actions/workflows/tests.yml/badge.svg)](../../actions/workflows/tests.yml) [![CodeQL](../../actions/workflows/codeql-analysis.yml/badge.svg)](../../actions/workflows/codeql-analysis.yml) -Test suites use [`QUnit`][qunit] for assertions and [`testem`][testem] for serving the browser tests +| Suite | unit (node) | e2e (browser) | +| ------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Framework | [`jest`][jest] | [`playwright`][playwright] | +| Setup | |
npm run build -- -f -w| +| Running Tests
\|-- [filter] [watch]
npm run test:jest -- [filters] [-w]
npm run test:e2e -- [filters] [--ui]
npm start vanilla| +| Test Spec | | - `index.ts`: built and loaded into the web app
npx playwright codegen http://localhost:1234