Skip to content

Commit

Permalink
global: renaming of example folder to examples
Browse files Browse the repository at this point in the history
Signed-off-by: Harris Tzovanakis <me@drjova.com>
  • Loading branch information
drjova committed Jul 26, 2016
1 parent ae952b4 commit 3b9cf4a
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Installation
Demo
----

$ cd example; npm install; cd ..
$ cd examples/simple; npm install; cd ../..
$ npm run-script demo

Navigate to `http://localhost:8000` to see the `demo`.
Expand All @@ -36,4 +36,4 @@ Docs
How to use?
-----------

Check out the `example/` to see how to configure your app.
Check out the `examples/` to see how to configure your app.
29 changes: 29 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- Copyright (C) 2016 CERN.
Invenio is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
Invenio is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with Invenio; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307, USA.
In applying this license, CERN does not
waive the privileges and immunities granted to it by virtue of its status
as an Intergovernmental Organization or submit itself to any jurisdiction.
-->
<html>
<body>
<h3>Please choose one of the available examples:</h3>
<ul>
<li><a href='./simple'>Simple example</a></li>
</ul>
</body>
</html>
10 changes: 5 additions & 5 deletions example/index.html → examples/simple/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ <h1>Invenio Records Demo</h1>
extra-params="{}"
record='{}'
initialization="http://locahost:5000/deposition"
form="/example/static/json/form.json"
schema="/example/static/json/schema.json"
form="./static/json/form.json"
schema="./static/json/schema.json"
>
<invenio-records-error
template="/src/invenio-records-js/templates/error.html">
</invenio-records-error>
<invenio-records-alert
template="/src/invenio-records-js/templates/alert.html">
</invenio-records-alert>
<invenio-records-actions
template="/src/invenio-records-js/templates/actions.html">
</invenio-records-actions>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ gulp.task('demo', function() {
gulp.src(rootDirectory)
.pipe(plugins.webserver({
livereload: true,
open: '/example/index.html'
open: '/examples/index.html'
}));
});

Expand Down
10 changes: 7 additions & 3 deletions test/e2e/invenio-records-js/invenioRecordsErrorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ describe('Unit: testing directive invenio-records-error', function() {
'initialization="http://locahost:5000/" ' +
'form="/example/static/json/form.json" ' +
'schema="/example/static/json/schema.json">' +
'<invenio-records-error ' +
'template="src/invenio-records-js/templates/error.html"> '+
'</invenio-records-error>'+
'<invenio-records-alert ' +
'template="src/invenio-records-js/templates/alert.html"> '+
'</invenio-records-alert>'+
'</invenio-records>';
// Compile
template = $compile(template)(scope);
Expand All @@ -84,5 +84,9 @@ describe('Unit: testing directive invenio-records-error', function() {
scope.$broadcast('invenio.records.alert', message);
expect(scope.recordsVM.invenioRecordsAlert.data)
.to.deep.equal(message.data);

scope.$digest();

expect(template.find('.alert').text()).to.contain(message.data.message);
});
});

0 comments on commit 3b9cf4a

Please sign in to comment.