Comments (32)
I put in a request to Cypress. If approved, Cypress will provide AP with a plan that allows unlimited test recordings and up to 5 users. All projects we create in the Cypress Dashboard will be public. Data will be retained for 90 days. Our organization will have access to all the features the Cypress Dashboard provides, including parallelization.
CC: @jeromesimeon @DianaLease @dselman @mttrbrts @accordproject/maintainers-ui @accordproject/tsc @accordproject/contributors
from web-components.
May I start working on this?
from web-components.
OH! Yeah I don't know why that is, that must've been a mistake on my part sorry about that.
from web-components.
This approach doesn't strike me as wrong so far, so yeah let's see how this progress goes. Storybook suggesting Cypress is a good sign that it would be a good approach.
from web-components.
@sanketshevkar Let's be pragmatic, the second option works for you, and we have a sample here: https://github.com/accordproject/web-components/blob/master/packages/storybook/cypress/storybook/storybook.spec.js
Let's go with 2.
One downside is that it requires a contributor to run tests for the storybook package when only making changes to an individual component. However, we can probably mitigate that with some test filtering and good docs.
from web-components.
@sanketshevkar Since the issue is very large so lets divide issue.
from web-components.
I've been anyways unassigned from this one. It's an open issue now. I've started with testing headings. If you want you can join in for that or pick up any other part you want.
Okk So I will pick up the Marks
part then.
from web-components.
Yeah maybe this isn't the best way, but I'm thinking call out which one you want to work on and we can put your name next to it in the original post. So I'll put @sanketshevkar on headings and @Cronus1007 on marks.
from web-components.
@irmerk I'm not able to find the code for this test.
from web-components.
@sanketshevkar none of these tests currently exist. The Issue is for creating them.
from web-components.
@sanketshevkar none of these tests currently exist. The Issue is for creating them.
No problem, the checkbox was checked, that's why I thought so.
from web-components.
I'm writing the interaction tests using cypress. The storybook documentation also suggested using enzyme or cypress for interaction testing. Also setting up enzyme within storyshots was a bit complicated so decided to use cypress which is working fine. I did some dummy tests with the web-components storybook and seemed to workout, I'll share the video by tomorrow. Just wanted to know whether this approach would be right?
from web-components.
https://www.loom.com/share/b128d0a885694420bf4d55edda57ab73
Video for cypress test.
- Places cursor inside the paragraph:
This is text. This is italic text. This is bold text. This is a link. This is
inline code
.
- Changes it to Header 2.
- Undo
- Redo
from web-components.
@irmerk what is the difference between
Selecting a paragraph and changing to header 1, 2, 3
Switching paragraph to header 1, 2, 3
from web-components.
Very cool. I haven't used Cypress before. It looks like we'll want to set up an OSS plan with them (instructions) and implement this in GitHub Actions for this repo.
These two you mentioned may end up being the same. In my mind I wanted to distinguish the difference between highlighting an entire paragraph with the cursor, placing the cursor inside the paragraph, highlighting a word, and highlighting the paragraph with a triple click.
from web-components.
I think just continue on @sanketshevkar, I'm opening another Issue to track setting up Cypress for this repo.
from web-components.
@irmerk That sounds great. Should I create a pr for cypress setup and then start working on the tests?
from web-components.
What would that involve @sanketshevkar?
from web-components.
Basically has two parts:
- Setting up cypress on your local machine.
- Setting up cypress within your project, which is a simple npm install command, update scripts in package.json, after running the test for the first time it sets up a cypress folder with some sample tests. I'll delete the example tests within the cypress folder and create a file for markdown-editor test.
from web-components.
Yeah I think that works
from web-components.
@irmerk I've made a pull request with the cypress setup.
from web-components.
@irmerk @sanketshevkar Cypress testing only deals with the automated testing software for e2e whereas there is a need to lay down the setup for unit testing as well.
from web-components.
What do you propose @Cronus1007?
from web-components.
@irmerk The Jest
will be the best open source tool for unit testing of React Web Apps
but I highly prefer a combined mocha
and chai
for the testing of js applications. Plus can start the work for cypress once #282 gets merged.
from web-components.
We should follow the precedent set in ui-concerto
that uses Jest
and react-testing-library
for unit tests.
from web-components.
This issue will track the tests which need to be implemented in order to increase stability of this codebase. Please feel free to add suggestions.
Hotkeys in markdown-editor have not been added i guess.
from web-components.
Now that #282 is finished, this Issue becomes a lot more accessible. I'm going to mark it as unassigned because this is probably the single most important Issue in this repo currently and I want to leave it open for as many people to work on it as possible.
from web-components.
Now that #282 is finished, this Issue becomes a lot more accessible. I'm going to mark it as unassigned because this is probably the single most important Issue in this repo currently and I want to leave it open for as many people to work on it as possible.
Works for me 👍.
from web-components.
@irmerk I wanted to discuss the structure of the tests. Basically, there are two ways we can do it:
- mount the component and test the interactions.
- load the storybook using the localhost url and test the component interactions.
The first one is suggested by cypress docs and the second one by storybook docs, which one would be preferable?
I've tried using the second method and it was working.
from web-components.
@sanketshevkar Let's be pragmatic, the second option works for you, and we have a sample here: https://github.com/accordproject/web-components/blob/master/packages/storybook/cypress/storybook/storybook.spec.js
Let's go with 2.
One downside is that it requires a contributor to run tests for the storybook package when only making changes to an individual component. However, we can probably mitigate that with some test filtering and good docs.
Okay, that sounds cool. I'll move ahead with this.
from web-components.
@sanketshevkar Since the issue is very large so lets divide issue.
I've been anyways unassigned from this one. It's an open issue now. I've started with testing headings. If you want you can join in for that or pick up any other part you want.
from web-components.
@mttrbrts @irmerk is this still needed/open? If yes, I can pick this up again 😄
from web-components.
Related Issues (20)
- installation error HOT 3
- Paragraphs above or below clause templates can't be deleted HOT 3
- Change markdown editor empty-state text HOT 4
- Overriding Default CSS
- web-components release 0.97 makes inconsistent assumptions about Concerto
- Adding Docstrings to the Project HOT 1
- Styling-Library HOT 11
- contract-editor error onChange: Cannot read property 'focus' of null HOT 5
- Change in Demo Text Of Markdown Editor HOT 2
- Adding Background In Inline Code HOT 6
- Heading Markdown Shortcut WYSIWYG (What You See Is What You Get) HOT 1
- npm install doesn't work for @accordproject/ui-markdown-editor HOT 5
- Undefined Nodes in some templates HOT 2
- Deployed github-page shows an Error 404 page. HOT 4
- Inline Markdown Shortcuts (WYSIWYG) HOT 2
- Update Readme HOT 1
- Formatting Button Error HOT 10
- [BUG]: Buttons not working HOT 4
- Implementation of PurgeCSS HOT 2
- Twitter icon is old. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web-components.