Skip to content

Commit

Permalink
Merge pull request magento#2674 from magento-borg/MAGETWO-92468-make-…
Browse files Browse the repository at this point in the history
…tests-namespace-agnostic

[borg] MAGETWO-92468: Make PR testsuite namespace-agnostic
  • Loading branch information
pdohogne-magento authored Jun 9, 2018
2 parents 8369afa + 4dea3b6 commit 38d7977
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ app/code/Magento/Customer/view/frontend/web/js/zxcvbn.js
app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-bundle.js
app/code/Magento/Swagger/view/frontend/web/swagger-ui/js/swagger-ui-standalone-preset.js

// MINIFIED FILES
app/code/**/*.min.js

// TO REFACTORING
app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js
app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
return [
'/\.(jpe?g|png|gif|ttf|swf|eot|woff|pdf|mp3|pdf|jar|jbf)$/',
'/pub\/opt\/magento\/var/',
'/COPYING\.txt/'
'/COPYING\.txt/',
'/app\/code\/(?!Magento)[^\/]*/'
];
22 changes: 14 additions & 8 deletions dev/tools/grunt/tools/collect-validation-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
* See COPYING.txt for license details.
*/

/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
'use strict';

var glob = require('glob'),
Expand All @@ -29,17 +25,27 @@ module.exports = {
getFilesForValidate: function () {
var blackListFiles = glob.sync(pc.static.blacklist + '*.txt'),
whiteListFiles = glob.sync(pc.static.whitelist + '*.txt'),
blackList = this.readFiles(blackListFiles),
whiteList = this.readFiles(whiteListFiles),
files = [];
blackList = this.readFiles(blackListFiles).filter(this.isListEntryValid),
whiteList = this.readFiles(whiteListFiles).filter(this.isListEntryValid),
files = [],
entireBlackList = [];

fst.arrayRead(blackList, function (data) {
entireBlackList = _.union(entireBlackList, data);
});

fst.arrayRead(whiteList, function (data) {
files = _.difference(data, blackList);
files = _.difference(data, entireBlackList);
});

return files;
},

isListEntryValid: function(line) {
line = line.trim();
return line.length > 0 && line.startsWith('// ') !== true;
},

getFiles: function (file) {
if (file) {
return file.split(',');
Expand Down

0 comments on commit 38d7977

Please sign in to comment.