Added "Customize Cookies" Banner, Added Session-Only Cookies Functionality, and Added Test Suite#84
Open
Abhird11 wants to merge 22 commits intomanucaralmo:masterfrom
Open
Added "Customize Cookies" Banner, Added Session-Only Cookies Functionality, and Added Test Suite#84Abhird11 wants to merge 22 commits intomanucaralmo:masterfrom
Abhird11 wants to merge 22 commits intomanucaralmo:masterfrom
Conversation
This includes a completely new button that allows more in-depth cookie selection. Previously, you could only accept all or reject all, but now you are able to specify what specifically you want to accept or reject using different switches. More customization options coming soon to this for styling and such.
Customizer would pop up when first entering the site because it wasn't set to display: none on the default case.
- added support for session only cookies - added index.html to create the object and view it - added addcookie.js to add cookies for the demo
Session only cookies is now the fourth switch in the cookie customizer. Upon saving this selection, it either activates or deactivates sessiononly cookies. Test suite is now stand alone class that can be used on the overall GlowCookies class. Combinatorial testing class has also been updated so it can create combinations of multiple types.
For the customization options, you can now change the width of the main cookies banner as necessary. Additionally, you can dynamically add new switches to the cookie customizer. Lastly, moved all the tests into one test class and refactored as necessary and added additional default testing/
Added a couple new tests, and added comments for the GlowCookiesTester class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Significant changes were made to improve functionality.
Banner Functionality
Test Suite
Added a comprehensive test suite (GlowCookiesTest.js)
In the GlowCookiesTest class, there is a combinatorial tester. This will simulate user clicks by calling different methods in the GlowCookies class, and ensure that the cookies exist or don't exist. There are several example tests already provided, but it is easy to add additional tests.
There is also a Fuzzer in the GlowCookiesTest class. This will create a new GlowCookies object with completely random parameters. The setProbability parameter of the fuzzer determines the chance that each parameter gets set to a random value rather than the default one, and the numTests parameter determines the number of these random objects to create and see if any errors are created. This can be combined with the combinatorial tester above by creating many of these GlowCookies objects, then simulating the user doing several actions through this banner.
Other
Updated "Watch Demo" link. This may need to updated to link to the original GitHub page, but it does not exist currently. A new page must be created to make it fully functional. It uses the index.html page in the src code, and addCookies.js is used for the demo.
Updated README to include all updated changes.