Timing - Test 4 of tier 5 expects 'carousel-item active' to exist almost always before it is loaded (assertTrue(checkElements())). The test as is has worked about once every 20 tries.
Test suite issues - Since test 4 is checking for IDs of the flashcards that the carousel is bound to also have, which causes ID conflicts, I've added a new function for a Revassess taker to fill out, similar to function manipDom() that is required in index.js - function carousel() - so that the carousel can be injected into the DOM only when the fourth test is run. There may be a better solution than this, however.
Number of checks - The test currently only checks for 2 out of the 3 flashcards.
I've resolved the issues with the following changes:
timing has been resolved. The issue was waiting for the carousel to appear and the test was moving forward before the js was finished working. I add a Thread.sleep() method call in the before method to allow this to work.
Some associates are going to be using HTML for their carousel and use js to manipulate the dom with js. So adding a carousel method to the template isn't ideal. for your code, I recommend calling the carousel function either inside the callFlashcardApi function, or adding an additional onload event listener to the window.
there was an assertion before the for loop to check the elements before the loop began. I did change it that way it was easier to read following your recommendations.
I am going to close this issue, let me know if there are any more problems.
assertTrue(checkElements())
). The test as is has worked about once every 20 tries.function manipDom()
that is required inindex.js
-function carousel()
- so that the carousel can be injected into the DOM only when the fourth test is run. There may be a better solution than this, however.I've resolved the issues with the following changes:
The changes were committed here.