-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Feature: e2e tests #143
Feature: e2e tests #143
Conversation
@UlisesGascon Awesome! Great work with e2e setup and login page tests. This has been in my wishlist for a long time and great to see the progress you have made towards it 👍. Yes, good idea to have a dev branch. We can expand the contributor's guide section on the README.md explaining the proposed git workflow to follow for PRs. |
In regards to test location, would it make more sense to put these tests in In terms of coding to interface rather than implementation and the Liskov substitution principle I'm not sure the dir should be named after the technology as opposed to the intent of the tests? |
- Support 404 - Nav Menus
- Removed unnecessary files - Refactor Test logic - Improved syntax - Added Database resets before and after every spec file - Added logout after every test - Improved legibility by adding more Cypress Commands
e2e test added
@UlisesGascon @KoolTheba ..Great Work..🎉🎉 I like the way you organized the tests and covered the key features. I have just a few of minor thoughts:
Rest of the tests and setup looks great to me 👍 |
Thanks for the feedback @ckarande 👍
|
Thanks @UlisesGascon & @KoolTheba. |
Bug discovered by @ckarande at #143 (comment)
@ckarande please check if the tests are working as expected, I forgot to add the config file in the previous commits 😓 |
- Triple slash directives - tsconfig type declaration
@ckarande I think all the changes you suggested are done 💪 Please review! ^^ |
@UlisesGascon @KoolTheba, fantastic! Thank you very much for your efforts on suggested changes. I had two failing tests for the profile page. The The second test failure came from the Other than above two items, rest of the changes look great to me. Well done. I am very excited and looking forward to include this test suite as part of the NodeGoat codebase! 🥇 |
Thanks for the feedback @ckarande! :-) I will skip Regarding |
@UlisesGascon I believe the idea behind this link was to just include a malicious payload (user supplied firstname in this case) to demo XSS in the URL context. It doesn't really go to google for search. @lirantal please suggest if you recall this. At some point we should include more details on this in the tutorial. |
Yep as @ckarande pointed out, the idea was to show an XSS in a URL context (so to apply proper encoding). We didn't really care that it's not a valid google search link. |
As requested in #143
Ready! 🎉 |
@UlisesGascon Looks great. I see the first name related test passing, but I have one test failure for Apparently the test is looking for "target" attribute present in the anchor tag, but it is not in the template.
Should we just remove this assert? |
All ready @ckarande. I removed the target validation part :-) |
Awesome @UlisesGascon . I am merging the PR. Thank you for your valuable contribution 🎉 |
Thanks for the merge! I will keep pushing changes to the repo after this weekend. I was focus on personal matters the last few weeks, sorry for the delay ;-) |
No worries at all. In fact, thanks for managing time for it.👍 |
Yeah! I am very close to send the PR, I just detected an issue with Travis and Cypress regarding child processes. But I hope that very soon I will be able to send the PR :-) |
Bug discovered by @ckarande at OWASP/NodeGoat#143 (comment)
Ready for review (See #142 )