TheWebTech / CrankShaft

A framework for building modern websites on the HubSpot Platform.
https://thewebtech.github.io/CrankShaft
MIT License
46 stars 17 forks source link

Test every aspect of the framework for Version 1.0 - Browser wise, variables wise. #49

Open TheWebTech opened 5 years ago

TheWebTech commented 5 years ago

Because this framework will likely get big and have a lot of parts i think it would be really awesome if we could include a way to test that the framework's features are working. I thought about trying Travis CI with it but it doesn't support jinjava. I think we likely will have to create a .html file we include in a tests folder which we add little tests to. Those of us who want to test on their portal would upload the full crankshaft repo to their portal and open a preview for said tests html template and we would have a JavaScript file evaluate if the tests pass and output the results. Users of the framework would not use this, only contributors.

If anyone has experience unit testing please share some wisdom. This is not my area of expertise but i figure even if my method isn't the best, something is better than nothing.

TheWebTech commented 5 years ago

I think it might be useful to use quixote a library for css unit testing. Otherwise we can just use jquery, set a hard width on the page test px values. Print out or console log test results. https://github.com/jamesshore/quixote

TheWebTech commented 5 years ago

created tests folder tests base file f534168

TheWebTech commented 5 years ago

Scratch that on quixote probably. It was last updated 2 years ago, and seems to require other testing tools to function.

Hand-rolling may be the way to go. Shouldn't be too bad overall.

TheWebTech commented 5 years ago

Mark Ryba found this awesome tool. Seems pretty perfect for what we need. https://www.cypress.io/