The Wayback Machine - https://web.archive.org/web/20201125013910/https://github.com/codex-team/editor.js/pull/1410
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

Basic initialisation test for Editor.js #1410

Merged
merged 28 commits into from Nov 21, 2020
Merged

Conversation

@ranemihir
Copy link
Member

@ranemihir ranemihir commented Nov 2, 2020

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:

  1. Run yarn install to add the added cypress dependency which will install the cypress framework.

  2. Run yarn test:dev in a separate terminal. This will create an express server hosting the test files.

  3. 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.

ranemihir added 3 commits Nov 3, 2020
@robonetphy
Copy link
Member

@robonetphy robonetphy commented Nov 10, 2020

I am getting this Error:
image

@ranemihir
Copy link
Member Author

@ranemihir ranemihir commented Nov 10, 2020

Steps to test the PR and run all the cypress tests:

  1. Run yarn install to add the added cypress dependency which will install the cypress framework.

  2. Run yarn test:dev in a separate terminal. This will create an express server hosting the test files.

  3. 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.

@neSpecc @khaydarov @gohabereg @robonetphy and to everyone else who wants to test and review this PR.

example/example.html Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
test/cypress/integration/basic/initialization.spec.js Outdated Show resolved Hide resolved
test/cypress/integration/basic/initialization.spec.js Outdated Show resolved Hide resolved
test/cypress/integration/basic/initialization.spec.js Outdated Show resolved Hide resolved
test/cypress/integration/basic/initialization.spec.js Outdated Show resolved Hide resolved
test/cypress/integration/basic/initialization.spec.js Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
ranemihir added 8 commits Nov 13, 2020
@hata6502
Copy link
Contributor

@hata6502 hata6502 commented Nov 16, 2020

Hello! Do you have a plan to measure test coverage?
If so, please see: https://docs.cypress.io/guides/tooling/code-coverage.html

And, would you use CodeCov, and display code coverage as badge in README.md?
https://codecov.io/

ranemihir added 3 commits Nov 18, 2020
.eslintrc Outdated Show resolved Hide resolved
test/cypress/integration/basic/initialization.spec.js Outdated Show resolved Hide resolved
test/cypress/integration/basic/initialization.spec.js Outdated Show resolved Hide resolved
neSpecc added 3 commits Nov 21, 2020
@neSpecc
Copy link
Member

@neSpecc neSpecc commented Nov 21, 2020

Hello! Do you have a plan to measure test coverage?
If so, please see: https://docs.cypress.io/guides/tooling/code-coverage.html

And, would you use CodeCov, and display code coverage as badge in README.md?
https://codecov.io/

I think, we can adjust the CodeCov a little bit later, when we'll write more tests.

@hata6502
Copy link
Contributor

@hata6502 hata6502 commented Nov 21, 2020

@neSpecc OK!
When installing the code coverage report, please check: https://github.com/ranemihir/editor.js/pull/1/files

neSpecc and others added 8 commits Nov 21, 2020
@neSpecc neSpecc merged commit 585e01b into codex-team:next Nov 21, 2020
2 checks passed
2 checks passed
ESlint
Details
deploy/netlify Deploy preview ready!
Details
@ranemihir
Copy link
Member Author

@ranemihir ranemihir commented Nov 21, 2020

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"

This comment has been minimized.

@hata6502

hata6502 Nov 21, 2020
Contributor
Suggested change
"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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.