-
Notifications
You must be signed in to change notification settings - Fork 78
672 use BEM for styles #846
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
Conversation
|
Wow, this is a lot of work. Okay, I need time to sit down and go through this. Looks like there are conflicts due to my changes now too @rlueder, and some failing tests. Would you be able to fix conflicts/tests and then I can make sure I sit down to review this and understand it fully. |
|
Hey @rlueder - I saw that you mentioned you were a bit confused about decoupling the tests from css. It so happens that your tests are failing for that very reason. In this PR, you've updated some classes to follow the BEM style guide. Some of the page objects (used in tests to represent/select from pages and/or components) used those css classes as selectors. Because those css classes no longer exist, they are not returning the expected values, and in result the tests are failing. Going forward we want to use A good example of this failing test. It is failing because this class name was replaced. The page object for that component scopes by that class. For this reason, the test fails as it cannot find the element. The solution to this is to apply a new To add a basically you'll be doing the following: {{!-- app/templates/start/interests.hbs --}}
{{categories-list categories=model data-test-selector="Categories List"}}and in the component // app/components/categories-list.js
...
export default Component.extend({
attributeBindings: ['data-test-selector'], // <-- you'll need to add the attributeBindings
classNames: ['start__interests'],
...Now that the // tests/pages/components/categories-list.js
...
export default {
scope: '[data-test-selector="Categories List"]',
...This is just an example of one of the changes, but I hope it sheds some light on what was meant by the decoupling of tests from css. Let me know if you have any questions, I'd be more than happy to help. |
|
@WenInCode is this documented in our tasks about how to do this, or somewhere else? If not, think good to add so those tasks can be legitimately labeled |
|
@joshsmith It is not currently, I just wrote it up last night for this. I can add it to #698 though. Might be good to mention somewhere in contributing docs as well for new folks contributing. |
|
@WenInCode agreed |
c7d63b5 to
0cddf0f
Compare
0cddf0f to
2c7df57
Compare
joshsmith
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally fixed issues I caused by waiting so long to review and reviewed this. Thanks @rlueder for all your hard work here.
2c7df57 to
91c35de
Compare
91c35de to
10685e6
Compare
|
🙌 @rlueder |
What's in this PR?
This PR is taking care of most of the refactoring needs described in #672
The approach I'm taking is (somewhat) documented here: Code Corps SASS Ideas and Discussion
References
Progress on: #672