-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Defaulting missing alt-text for a product to use the product name. #11323
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
836cb30
Defaulting missing alt-text for a product to use the product name.
3381ec0
Adding unit test coverage for Catalog/Block/Product/View/Gallery's ge…
0f1b58f
Correcting code to conform with static code testing.
7f44e66
Correcting code to conform with static code testing.
8aeb71b
Update image label values on product entity on admin product save
dmanners 1511377
Fix code style for empty label check if statement
dmanners bab1a38
Extract image and lavel processing for media attributes into their ow…
dmanners d6fa9db
Solve some complexity issues with the save handler
dmanners ae5454a
Make sure there is a space between the two new methods
dmanners File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
The static tests will complain that the
{
needs to be on a new line. You should be able to run the static tests over your changes and see all the issues otherwise you can wait until Travis has finished. Though I think there will be nothing more than: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.
@dmanners - I have fixed the above issues, but am curious if you can point me to the correct configuration for running the static code analysis. When I run the below command, I get more issues than what you have said.
vendor/squizlabs/php_codesniffer/bin/phpcs app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryTest.php
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.
So those results came from the build system. Not 100% sure how it was run but there are a couple of things I have done locally before.
./vendor/bin/phpcs app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryTest.php dev/tests/static/framework/Magento
- This will run the framework/Magento standards when running phpcs.You could also try
bin/magento dev:tests:run static
but that runs them all.Finally there is a way of running them only on a diff (though I have as yet got that running....) From what I understand you run
git diff origin/2.2-develop HEAD --name-only > dev/tests/static/testsuite/Magento/Test/_files/changed_files_local.txt
and this will create a list of changed files from your branch compared to another branch (in this case origin/2.2-develop). Then after that when running the suite it should only run on those files you changes. Maybe @okorshenko knows the full command for the static tests.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.
There is one other option which is to setup Travis against your fork. This would then mean you could run the travis checks before providing a PR.
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.
@brobie ok so if you run the
git diff
as described above followed by./vendor/bin/phpunit --config dev/tests/static/phpunit.xml.dist
that should show you the details you are looking for.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.
Awesome, I'll give it a try!
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.
Here is the request that mimics the rules used by Magento for Code Sniffer (I think)
vendor/squizlabs/php_codesniffer/bin/phpcs --standard=dev/tests/static/framework/Magento/ruleset.xml app/code/Magento/Catalog/Test/Unit/Block/Product/View/GalleryTest.php