Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMoskovkin committed Feb 10, 2018
1 parent 3875256 commit 6af6f98
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ var CLIENT_TESTS_SETTINGS_BASE = {
{ src: '/before-test.js', path: 'test/client/before-test.js' }
],

css: [ { src: '/styles.css', path: 'lib/client/ui/styles.css' } ],

configApp: require('./test/client/config-qunit-server-app')
};

Expand Down
2 changes: 2 additions & 0 deletions test/client/before-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(function () {
$('<link rel="stylesheet" type="text/css" href="/styles.css">').appendTo('head');

//NOTE: Prohibit Hammerhead from processing testing environment resources.
// There are only testing environment resources on the page when this script is being executed. So, we can add
// the hammerhead class to all script and link elements on the page.
Expand Down
4 changes: 1 addition & 3 deletions test/client/config-qunit-server-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ module.exports = function (app) {

app.all('/styles.css', function (req, res) {
fs.readFile(path.join(__dirname, '../../lib/client/ui/styles.css'), function (err, css) {
/* eslint-disable no-console */
console.log('GOT!');
res.set('Content-Type', 'text/css');
res.send(createShadowStylesheet(css));
res.send(createShadowStylesheet(css.toString()));
});
});
};
2 changes: 1 addition & 1 deletion test/client/data/dom-utils/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script src="/ui.js" class="script-hammerhead-shadow-ui"></script>
<script src="/jquery.js" class="script-hammerhead-shadow-ui"></script>

<link type="text/css" rel=stylesheet href="/ui.css" class="ui-stylesheet-hammerhead-shadow-ui">
<link type="text/css" rel=stylesheet href="/styles.css" class="ui-stylesheet-hammerhead-shadow-ui">
</head>
<body>
<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion test/client/data/focus-blur-change/iframe.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel=stylesheet href="/ui.css" class="ui-stylesheet-hammerhead-shadow-ui">
<link type="text/css" rel=stylesheet href="/styles.css" class="ui-stylesheet-hammerhead-shadow-ui">

<script src="/hammerhead.js" class="script-hammerhead-shadow-ui"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion test/client/data/runner/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script src="/legacy-runner.js" class="script-hammerhead-shadow-ui"></script>
<script src="/jquery.js" class="script-hammerhead-shadow-ui"></script>

<link type="text/css" rel=stylesheet href="/ui.css" class="ui-stylesheet-hammerhead-shadow-ui">
<link type="text/css" rel=stylesheet href="/styles.css" class="ui-stylesheet-hammerhead-shadow-ui">
</head>
<body>
<script type="text/javascript">
Expand Down

0 comments on commit 6af6f98

Please sign in to comment.