Comments (7)
@QuincyLarson Are you referring to the note to campers that I included a screenshot of above? That note will not appear in the PR as it is a comment left directly in the codepen boilerplate (the only effective place to leave it and guarantee that campers see it). It is included in the boilerplate found here: http://codepen.io/freeCodeCamp/pen/MJjpwO
If this is what you meant, I think you can go ahead and close this again. However, our approach still isn't perfect, so we can always leave it open to see if any other campers come along with and ideas down the road!
from testable-projects-fcc.
@QuincyLarson So I've taken a look, and I think with the fix made from issue #22, the one about the input[type="checkbox"]
, there are no other rules from the test suite's CSS that will pollute a projects CSS, however, enforcing the reverse is quite the challenge.
If a user adds global styles to their projects using the *
selector or something like:
body {
color: red; /* will affect text in foldaway menu */
h2 {
border-bottom: 2px solid black; /* will affect test cases in mocha div */
}
}
or:
body span {
margin: 100px; /* will affect items in the foldaway menu */
}
Any rules like these have the potential to affect the test suites styling. Was discussing this with @Weezlo at some point, and we were not sure of a good way to prevent this, aside from adding a warning in the boilerplate pen:
from testable-projects-fcc.
@no-stack-dub-sack one thing you could do is set all the CSS properties specific to your test result box to !important which would make them harder to accidentally override.
from testable-projects-fcc.
@QuincyLarson I've already done this for most elements in the project, however, the bigger problem is properties that we are not setting rules for at all. In order to prevent those from being overridden, I believe we'd have define every single property as its default and then use !important
, which is obviously not practical or maintainable... so still kind of at a loss on this one.
Also, the CSS for the elements in the test results div - the one that actually shows the individual user stories and whether or not they've passed or failed - this is controlled by Mocha's CSS, which uses specificity, rather than classes in most cases, to set the styles. I suppose I could go in and modify Mocha's CSS, but again, the most common properties that are being overridden here, are properties that are not set at all in Mocha's CSS (such as border
, color
, etc.).
EDIT: I've added !important
to several other elements to be a bit safer, but will still not account for the *
selector or for properties we have not set
from testable-projects-fcc.
@no-stack-dub-sack it sounds like we've covered MOST of the bases, and can let this go. As long as we have some basic text, like the text you proposed, that notifies campers that their CSS can break the tests, I think we're OK. At the end of the day, there's only so much we can do to prevent them from doing these things.
from testable-projects-fcc.
@no-stack-dub-sack I checked your PR and it didn't have your note about global style rules so I reopened this issue. To be 100% clear, I agree that a note about global styles is good and we should have one. Your verbiage above is sound. Once you've added it, I think we can close this issue.
from testable-projects-fcc.
@no-stack-dub-sack OK - thanks for pointing this out. Yes - I'm glad campers will see that comment right in the boilerplate.
from testable-projects-fcc.
Related Issues (20)
- test issue when i'm working with survey project , test shows test failed list of tribute page HOT 1
- Test failing but test requirement has been met HOT 1
- getting an error on product landing page #landing test. it says the navbar should always be at the top of the page. the navbar is at the top of my page but i am still receiving the error. HOT 1
- FCC Personal Portfolio - Can't get Layout #3 test to pass regarding navbar and viewport HOT 2
- project verification script not detecting required id tags in my code HOT 1
- User Story #11: Within the form, there is a submit input with a corresponding id="submit" HOT 1
- Test scripts are not correct HOT 1
- Personal Portfolio Project Bugs
- i think this is bog, 3 hour i am trying HOT 1
- Pomodoro Clock #15 Test of "25 + 5" Test Suite May Be Yielding Incorrect Results HOT 3
- Survey Form Test Issues
- FCC: Tribute Page
- Potrfolio tests: typo in #Content test number 4
- the test is not running HOT 1
- Markdown Preview tests not compatible with Vue HOT 1
- TypeError: Cannot read property '1' of null for Pomodoro clock. Why?????!!!!!!! HOT 1
- Issue with image running Tribute Page tests HOT 2
- Dependency Dashboard
- Build a JavaScript Calculator tests typo HOT 3
- incomplete fix for 25+5 with React@18 in #1485
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testable-projects-fcc.