-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Basic initialisation test for Editor.js #1410
Conversation
Steps to test the PR and run all the cypress tests:
@neSpecc @khaydarov @gohabereg @robonetphy and to everyone else who wants to test and review this PR. |
Hello! Do you have a plan to measure test coverage? And, would you use CodeCov, and display code coverage as badge in README.md? |
I think, we can adjust the CodeCov a little bit later, when we'll write more tests. |
@neSpecc OK! |
Thanks! @neSpecc |
"svg:win": "if not exist dist md dist && yarn svg", | ||
"svg": "svg-sprite-generate -d src/assets/ -o dist/sprite.svg", | ||
"pull_tools": "git submodule update --init --recursive", | ||
"checkout_tools": "git submodule foreach git pull origin master" | ||
"checkout_tools": "git submodule foreach git pull origin master", | ||
"test:e2e": "cypress open" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"test:e2e": "cypress open" | |
"test:e2e": "cypress run", | |
"cypress:open": "cypress open" |
cypress open: Open cypress GUI window.
cypress run: Run cypress test in CUI.
* Initial commit * Fixed test.html file * Create editor instance in the test * Assert paragraph data in editor instance * Moving cypress folder to test folder * Minor Fixes * Removed config test for now * Fixed example.html * Fixed editor.js dist path * Minor Fixes * Stored Host in a const * Add nodemon and Fix commands * Add and configure cypress eslint plugin * Updated Tests according to best practices * Minor FIxes * Minor FIxes * adjust eslint and ts * Update .eslintrc * improve config * debug tests * fix tests * Fix declarations * descrease debounce * rm timeout * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Peter Savchenko <[email protected]> Co-authored-by: George Berezhnoy <[email protected]>
Any plans to add code coverage? If not, I will likely submit a pr for this. |
In this PR, I have set up Cypress testing framework and added a basic test which asserts whether an instance of EditorJS in created or not in
<div id="editorjs"></div>
.Steps to test the PR and run all the cypress tests:
Run
yarn install
to add the added cypress dependency which will install the cypress framework.Run
yarn test:dev
in a separate terminal. This will create an express server hosting the test files.Run
yarn test:cypress
. This will automatically open the installed cypress framework and it will use the default browser in under automation to run all the tests and show you the results.