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
[Beta] Applied Accessibility - Tests fails to check for the closing </time> tag #16423
Comments
Possible fix for this too on this line $('time').first().text() == "Thursday, September 15th" |
Hi there, this seems simple enough for me to fix. I presume we simply need to modify the first test condition. And the code in the background should verify for both the opening and closing before it changes the icon next to the test condition from the "refresh-icon::before" to the "success-icon::before". I've tried downloading the website to look into the JavaScript files, naturally there is quite a bit of code in there. Am I on the right path to finding that particular line of code to adjust? |
Hi @PolarisTLX Yes you are on the correct path. Basically you need to setup a The code you will probably look for is in the challenge seed directory. Each individual section in the map is split into folders. You will be looking for the Applied Accessibility json file. Once you have made changes to the file and saved it you will need to run Coming to the testing of both opening and closing brackets. I myself have been trying to test for both opening and closing footer elements on issue #16416 and I haven't found a way. I've tried Regex but I'm not really the best at it. I've also tried playing with how Chai |
The only solution I've found was to write a really really long Regexp. But I'm not sure if it's really a good enough solution to PR. |
Alright I have the local dev environment up and running, and I have found the test in question in the applied-accessibility.json file. And I think I have code required, however, I am not sure where to place this code. I also think a RegExp is the quickest solution, and here is mine:
When testing it in a console, I verified it worked on what the users solution should look like:
It appears that it would also work if it was shortened to just:
But that might be less accurate. |
Okay so looking at the test for the time challenge you'll have to replace the current For reference on how the test should look you can also look at the |
Alright I've successfully been running and modifying the local dev environment. Then I modified the code on line 706 of file "applied-accessibility.json" I can tell that it is being tested as I can modify the "message" part. But the test is not working. |
Added test cases with assert statements BREAKING CHANGE: no Closes freeCodeCamp#16415 Closes freeCodeCamp#16424 Closes freeCodeCamp#16423 Closes freeCodeCamp#16422 Closes freeCodeCamp#16420 Closes freeCodeCamp#16419 Closes freeCodeCamp#16417 Closes freeCodeCamp#16414
Challenge Name
https://beta.freecodecamp.org/en/challenges/applied-accessibility/standardize-times-with-the-html5-datetime-attribute
Issue Description
The test is failing to check for the closing
</time>
tag. You can reproduce this issue by using the opening<time>
tag and leaving out the closing tag.Browser Information
Your Code
Screenshot
The text was updated successfully, but these errors were encountered: