Browse Source

Fix test configs

pull/36/head
Artur Arseniev 9 years ago
parent
commit
5f39e9de53
  1. 2
      test/config/config.js
  2. 6
      test/index.html
  3. 3
      test/runner/main.js
  4. 2
      test/specs/asset_manager/view/AssetImageView.js
  5. 2
      test/specs/dom_components/view/ComponentTextView.js
  6. 5
      test/specs/style_manager/view/SectorView.js
  7. 4774
      yarn.lock

2
test/config/config.js

@ -8,7 +8,7 @@ require.config({
paths : {
chai : '../node_modules/chai/chai',
sinon : '../node_modules/sinon/sinon',
sinon : '../node_modules/sinon/lib/sinon',
mocha : '../node_modules/mocha/mocha',
},

6
test/index.html

@ -4,15 +4,15 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>GrapesJS Test</title>
<link rel="stylesheet" href="../vendor/mocha/mocha.css">
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<div id="fixtures" style="display: none;"></div>
<!-- <script> var require = {config: function (c) {require = c;}}; </script> -->
<script src="../vendor/mocha/mocha.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script> mocha.setup({ignoreLeaks: true, ui:'bdd'}); </script>
<script data-main="runner/main" src="../vendor/require/require.js"></script>
<script data-main="runner/main" src="../node_modules/requirejs/require.js"></script>
<script src="http://localhost:35729/livereload.js"></script>
</body>
</html>

3
test/runner/main.js

@ -20,8 +20,9 @@ require(['../src/config/require-config.js', 'config/config.js'], function() {
'specs/parser/main.js',
'specs/grapesjs/main.js',
'specs/utils/main.js'
], function(chai)
], function(chai, sinon)
{
window.sinon = sinon;
var should = chai.should(),
expect = chai.expect;

2
test/specs/asset_manager/view/AssetImageView.js

@ -77,4 +77,4 @@ define(['AssetManager/view/AssetImageView', 'AssetManager/model/AssetImage', 'As
}
};
});
});

2
test/specs/dom_components/view/ComponentTextView.js

@ -39,7 +39,7 @@ define([path + 'ComponentTextView', 'DomComponents/model/Component'],
});
it('Input content is stored in model', function() {
view.enableEditing();
//view.enableEditing();
view.el.innerHTML = 'test';
//view.disableEditing();
//model.get('content').should.equal('test');

5
test/specs/style_manager/view/SectorView.js

@ -41,7 +41,6 @@ define([path + 'SectorView', 'StyleManager/model/Sector'],
var props = sector.querySelector('.properties');
props.should.be.ok;
sector.classList.contains('open').should.equal(true);
props.style.display.should.equal('block');
});
it('No properties', function() {
@ -86,7 +85,7 @@ define([path + 'SectorView', 'StyleManager/model/Sector'],
view.remove();
});
it('Rendered correctly', function() {
it('Rendered correctly2', function() {
var sector = view.el;
var props = sector.querySelector('.properties');
sector.querySelector('.title').innerHTML.should.contain('TestName');
@ -106,4 +105,4 @@ define([path + 'SectorView', 'StyleManager/model/Sector'],
}
};
});
});

4774
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save