Merge pull request #181 from shower/npm

Moving from submodules to npm & bower module architecture
This commit is contained in:
Vadim Makeev 2014-03-20 21:12:39 +03:00
commit 5385931a8c
21 changed files with 279 additions and 1556 deletions

View File

@ -6,4 +6,8 @@ indent_style = tab
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = false
charset = utf-8
charset = utf-8
[*.json]
indent_style = space
indent_size = 2

6
.gitmodules vendored
View File

@ -1,6 +0,0 @@
[submodule "themes/ribbon"]
path = themes/ribbon
url = git://github.com/shower/ribbon.git
[submodule "themes/bright"]
path = themes/bright
url = git://github.com/shower/bright.git

4
.npmignore Normal file
View File

@ -0,0 +1,4 @@
.editorconfig
.gitignore
Contributing.md
bower.json

View File

@ -1,33 +1,34 @@
# Contributing to Shower
You're always welcome to contibute! There are five repositories in Shower project:
Youre always welcome to contibute! There are seven repositories in Shower project:
- [Shower](https://github.com/shower/shower) engine with Ribbon theme
- [Template](https://github.com/shower/template) for Shower engine and built-in themes
- [Core](https://github.com/shower/core) of Shower
- [Shower](https://github.com/shower/template) template
- [Ribbon](https://github.com/shower/ribbon) theme for Shower
- [Bright](https://github.com/shower/bright) theme for Shower
- [Jekyller](https://github.com/shower/jekyller) generator for Shower
- [Sho.io](https://github.com/shower/sho.io) online service
- [Shwr.me](https://github.com/shower/sho.io) service project
The most important part of the project is the [Shower](https://github.com/shower/shower) repository, containing [shower.js](https://github.com/shower/shower/blob/master/shower.js) file.
The most important part of the project is the [Core](https://github.com/shower/core) repository, containing [shower.js](https://github.com/shower/core/blob/master/shower.js) file.
## Issues
Before contributing to Shower, please read through [Issues](https://github.com/shower/shower/issues?state=open) to see open bugs and feature requests. If you have any feature to add to Shower, please make sure that you file an issue with your ideas first. If you've found a bug and want to fix it, please file an issue first. It might be a feature!
Before contributing to Shower, please read through [Issues](https://github.com/shower/shower/issues) to see open bugs and feature requests. If you have any feature to add to Shower or found a bug and want to fix it, please make sure you file an issue first.
## Process
To contribute to Shower, fork needed repository and start making changes. Don't forget to add upstream link to original repository and keep your fork updated. When you finish, send pull request back to original repository and supply clear description or link to existing issue.
To contribute to Shower fork needed repository and start making changes. Dont forget to add upstream link to original repository and keep your fork updated. Once you finished, send pull request back to original repository and supply clear description or link to existing issue.
## Code style
Please keep existing code style while contributing to Shower and be ready for code review by Shower authors and contributors. It's strongly recommended to validate your JavaScript changes using [JSHint](http://jshint.com/).
Please keep existing code style while contributing to Shower and be ready for code review by Shower maintainers. Its strongly recommended to install [EditorConfig](http://editorconfig.org) extension to your editor and validate your JavaScript changes using [JSHint](http://jshint.com/).
By historical reasons, Shower project is using tabs instead of spaces for code indentation. It's not a big deal to keep this rule while contributing using you code editor options, even if your code style is 13.4 spaces.
By historical reasons, Shower project is using tabs instead of spaces for code indentation. Its not a big deal to keep this rule while contributing using you code editor options, even if your code style is 13.4 spaces.
## Language
English is the main language for Shower project. All discussions and commit messages should be in English, no matter if it's good or bad. The second language of Shower is Russian. Offical Shower themes are always compatible with Cyrillic and Russian typography. All documentation to Shower is always localized to Russian.
English is the main language for Shower project. All discussions and commit messages should be in English, no matter if its good or bad. The second language of Shower is Russian. Offical Shower themes are always compatible with Cyrillic and Russian typography. All documentation to Shower is always localized to Russian.
---
If you have any questions, please ask [@shower_me](http://twitter.com/shower_me/) or file an [issue](https://github.com/shower/shower/issues?state=open).
If you have any questions, please ask [@shower_me](http://twitter.com/shower_me/) or file an [issue](https://github.com/shower/shower/issues/new).

View File

@ -1,38 +0,0 @@
module.exports = function(grunt) {
grunt.initConfig({
uglify: {
options: {
mangle: true,
banner: '/**\n * Shower HTML presentation engine: github.com/shower/shower\n * @copyright 2010<%= grunt.template.today("yyyy") %> Vadim Makeev, pepelsbey.net\n * @license MIT license: github.com/shower/shower/wiki/MIT-License\n */\n'
},
build: {
src: 'shower.js',
dest: 'shower.min.js'
}
},
connect: {
ribbon: {
options: {
port: 7497
}
}
},
dalek: {
options: {
browser: ['chrome']
},
src: [
'tests/*.js'
]
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-dalek');
grunt.registerTask('default', ['uglify']);
grunt.registerTask('test', ['connect', 'dalek']);
};

View File

@ -1,44 +1,57 @@
# Shower
# Shower HTML presentation engine
HTML presentation engine. Follow [@shower_me](http://twitter.com/shower_me/) for support and updates.
Follow [@shower_me](https://twitter.com/shower_me) for support and updates
To see Shower in action:
- Open [shwr.me](http://shwr.me/)
- Click any slide to enter presentation mode
- Use arrow keys to navigate
- Use arrow keys or presenter remote to navigate
- Press `Esc` to exit presentation mode
See more details on [using keyboard](https://github.com/shower/shower/wiki/Shortcuts) to control Shower.
See [Wiki](https://github.com/shower/shower/wiki) for more information how to use Shower.
## Using Shower
There are two ways of using Shower: you can get full template [ZIP 1.7 MB](http://shwr.me/template.zip) or just an engine [ZIP 915 KB](http://shwr.me/shower.zip). See more details for beginners and advanced techniques in [Quick Start](https://github.com/shower/shower/wiki/Quick-Start) instructions.
There are two ways of making presentation using Shower: you can just download an archive with all you need or you can install needed Shower modules using [npm](https://www.npmjs.org) or [bower](http://bower.io).
## Printing to PDF
## Simple Way
You can print your presentation to PDF using Google Chrome “Print to PDF” option in print dialog or [wkhtmltopdf](http://code.google.com/p/wkhtmltopdf) or [Prince](http://princexml.com).
Example of Shower template printed by Prince: [PDF 435 KB](https://github.com/shower/template/blob/master/index.pdf?raw=true). See more details on printing in [documentation](https://github.com/shower/shower/wiki/Print).
In a simple way you just download the latest Shower version with built-in themes and use it.
1. Download and unarchive [shower.zip](http://shwr.me/shower.zip)
2. Open `index.html` in any code or text editor, edit your slides in HTML
3. Use `pictures` folder for pictures used in presentation
4. Once finished, open `index.html` in a browser, enter full screen and start presenting
## Module Way
Module way allows you to manually install needed Shower packages and requires [Git](http://git-scm.com/) and [Node.js](http://nodejs.org/) installed together with package managment system: `npm` or `bower`.
1. Clone Shower `git clone git@github.com:shower/shower.git` or download [shower-pkg.zip](http://shwr.me/shower-pkg.zip)
2. Run `npm install` (or `bower install`) command in resulted folder to install script and themes
3. Open `index.html` in any code or text editor, edit your slides in HTML
4. Use `pictures` folder for pictures used in presentation
5. Once finished, open `index.html` in browser, enter full screen and start presenting
## Usage examples
- [Clear and Sharp](http://pepelsbey.net/pres/clear-and-sharp/)
- [CSS Management](http://pepelsbey.net/pres/css-management/)
- [CSS Management](http://pepelsbey.net/pres/knife-train/)
- [Push it!](http://pepelsbey.net/pres/push-it/)
- [Pre-fixes](http://pepelsbey.net/pres/pre-fixes/)
- [Web In Curves](http://pepelsbey.net/pres/web-in-curves/)
- [Sense Coding](http://pepelsbey.net/pres/sense-coding/)
- [Dynamic Graphics](http://pepelsbey.net/pres/dynamic-graphics/)
## Browser support
Supported desktop browsers: Chrome, Internet Explorer, Firefox, Opera, Safari. Only latest stable versions of mentioned browsers are supported.
Latest stable versions of Chrome, Internet Explorer, Firefox, Opera and Safari are supported.
## Contributing
You're always welcome to contibute. Fork project, make changes and send it as pull request. But it's better to file an [issue](https://github.com/shower/shower/issues) with your idea first. Read [contributing rules](https://github.com/shower/shower/blob/master/Contributing.md) for more details.
Youre always welcome to contibute. Fork project, make changes and send it as pull request. But its better to file an [issue](https://github.com/shower/shower/issues) with your idea first. Read [contributing rules](https://github.com/shower/shower/blob/master/Contributing.md) for more details.
Main contributors: [pepelsbey](https://github.com/pepelsbey), [jahson](https://github.com/jahson), [miripiruni](https://github.com/miripiruni), [kizu](https://github.com/kizu).
Main contributors: [pepelsbey](https://github.com/pepelsbey), [jahson](https://github.com/jahson), [miripiruni](https://github.com/miripiruni), [kizu](https://github.com/kizu), [artpolikarpov](https://github.com/artpolikarpov), [tonyganch](https://github.com/tonyganch).
---
Licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License), see [license page](https://github.com/shower/shower/wiki/MIT-License) for details.
Licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License), see [license page](https://github.com/shower/shower/wiki/MIT-License) for details.

24
bower.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "shower",
"version": "1.0.1",
"license": "MIT",
"main": "index.html",
"ignore": [
".editorconfig",
".gitignore",
".npmignore",
"Contributing.md",
"node_modules",
"package.json"
],
"keywords": [
"shower",
"presentation",
"template"
],
"dependencies": {
"shower-core": "^1.0.0",
"shower-ribbon": "^1.0.2",
"shower-bright": "^1.0.2"
}
}

176
index.html Executable file
View File

@ -0,0 +1,176 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Shower Presentation Engine</title>
<meta charset="utf-8">
<meta name="viewport" content="width=792, user-scalable=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="node_modules/shower-ribbon/styles/screen.css">
</head>
<body class="list">
<header class="caption">
<h1>Shower Presentation Engine</h1>
<p>Yours Truly, Famous Inc.</p>
</header>
<section class="slide cover" id="Cover"><div>
<h2>Shower Presentation Engine</h2>
<p>Brought to you by <a href="http://pepelsbey.net">Vadim Makeev</a></p>
<img src="pictures/cover.jpg" alt="">
<!--
To apply styles to the certain slides
set slide ID to get needed elements
-->
<style>
#Cover h2 {
margin:30px 0 0;
color:#FFF;
text-align:center;
font-size:70px;
}
#Cover p {
margin:10px 0 0;
text-align:center;
color:#FFF;
font-style:italic;
font-size:20px;
}
#Cover p a {
color:#FFF;
}
</style>
</div></section>
<section class="slide"><div>
<h2>Shower Key Features</h2>
<ol>
<li>Built on HTML, CSS and vanilla JavaScript</li>
<li>All modern browsers are supported</li>
<li>Slide themes are separated from engine</li>
<li>Fully keyboard accessible</li>
<li>Printable to PDF</li>
</ol>
<p class="note">Shower ['ʃəuə] noun. A person or thing that shows.</p>
</div></section>
<section class="slide"><div>
<h2>Plain Text on Your Slides</h2>
<p>Lorem ipsum dolor sit amet, consectetur <a href="#4">adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, <em>quis nostrud</em> exercitation ullamco laboris <strong>nisi ut aliquip</strong> ex ea commodo consequat. Duis aute irure <i>dolor</i> in reprehenderit in voluptate velit esse cillum <b>dolore</b> eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in <code>&lt;culpa&gt;</code> qui officia deserunt mollit anim id est laborum.</p>
</div></section>
<section class="slide"><div>
<h2>All Kind of Lists</h2>
<ol>
<li>Simple lists are marked with bullets</li>
<li>Ordered lists begin with a number</li>
<li>You can even nest lists one inside another
<ul>
<li>Or mix their types</li>
<li>But do not go too far</li>
<li>Otherwise audience will be bored</li>
</ul>
</li>
<li>Look, seven rows exactly!</li>
</ol>
</div></section>
<section class="slide"><div>
<h2>Serious Citations</h2>
<figure>
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia.</p>
</blockquote>
<figcaption>Marcus Tullius Cicero</figcaption>
</figure>
</div></section>
<section class="slide"><div>
<h2>Code Samples</h2>
<pre>
<code>&lt;!DOCTYPE html&gt;</code>
<code>&lt;html lang="en"&gt;</code>
<code><mark>&lt;head&gt;</mark> <mark class="comment">&lt;!--Comment--&gt;</mark></code>
<code> &lt;title&gt;Shower&lt;/title&gt;</code>
<code> &lt;meta charset="<mark class="important">UTF-8</mark>"&gt;</code>
<code> &lt;link rel="stylesheet" href="screen.css"&gt;</code>
<code><mark>&lt;/head&gt;</mark></code>
</pre>
</div></section>
<section class="slide"><div>
<h2>Even Tables</h2>
<table>
<tr>
<th scope="col">Locavore</th>
<th>Umami</th>
<th>Helvetica</th>
<th>Vegan</th>
</tr>
<tr>
<th scope="row">Fingerstache</th>
<td>Kale</td>
<td>Chips</td>
<td>Keytar</td>
</tr>
<tr>
<th scope="row">Sriracha</th>
<td>Gluten-free</td>
<td>Ennui</td>
<td>Keffiyeh</td>
</tr>
<tr>
<th scope="row">Thundercats</th>
<td>Jean</td>
<td>Shorts</td>
<td>Biodiesel</td>
</tr>
<tr>
<th scope="row">Terry</th>
<td>Richardson</td>
<td>Swag</td>
<td>Blog</td>
</tr>
</table>
<p>Its good to have information organized.</p>
</div></section>
<section class="slide cover" id="Picture"><div>
<h2>Pictures</h2>
<img src="pictures/picture.jpg" alt="">
<style>
#Picture h2 {
color:#FFF;
}
</style>
</div></section>
<section class="slide shout"><div>
<h2>You can even shout this way</h2>
</div></section>
<section class="slide"><div>
<h2>Inner Navigation</h2>
<ol>
<li>Lets you reveal list items one by one</li>
<li class="next">To keep some key points</li>
<li class="next">In secret from audience</li>
<li class="next">But it will work only once</li>
<li class="next">Nobody wants to see the same joke twice</li>
</ol>
</div></section>
<section class="slide shout" id="SeeMore"><div>
<h2><img src="pictures/logo.svg" alt=""> <a href="https://github.com/shower/shower">See more on GitHub</a></h2>
<style>
#Picture h2 {
color:#FFF;
}
#SeeMore h2 {
font-size:100px
}
#SeeMore img {
width:0.72em;
height:0.72em;
}
</style>
</div></section>
<p class="badge"><a href="https://github.com/shower/shower">Fork me on Github</a></p>
<!--
To hide progress bar from entire presentation
just remove “progress” element.
-->
<div class="progress"><div></div></div>
<script src="node_modules/shower-core/shower.min.js"></script>
<!-- Copyright © 2013 Yours Truly, Famous Inc. -->
<!-- Photos by John Carey, fiftyfootshadows.net -->
</body>
</html>

View File

@ -1,16 +1,33 @@
{
"name": "shower",
"description": "Shower HTML presentation engine",
"repository": "https://github.com/shower/shower/",
"version": "1.0.0",
"private": true,
"devDependencies": {
"dalekjs": "0.0.8",
"dalek-browser-chrome": "0.0.9",
"grunt": "~0.4.2",
"grunt-contrib-uglify": "~0.3.2",
"grunt-dalek": "~0.2.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-connect": "~0.6.0"
"version": "1.0.1",
"author": {
"name": "Vadim Makeev",
"url": "http://pepelsbey.com/"
},
"homepage": "http://shwr.me/",
"repository": {
"type": "git",
"url": "git://github.com/shower/shower.git"
},
"bugs": {
"url": "http://github.com/shower/shower/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/shower/shower/wiki/MIT-License"
}
],
"keywords": [
"shower",
"presentation",
"template"
],
"dependencies": {
"shower-core": "^1.0.0",
"shower-ribbon": "^1.0.2",
"shower-bright": "^1.0.2"
}
}

BIN
pictures/cover.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

3
pictures/logo.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500">
<path d="M50 500c-27.614 0-50-22.386-50-50v-400c0-27.614 22.386-50 50-50h400c27.615 0 50 22.386 50 50v219.224l-84.141-84.141-17.678 17.678 101.818 101.818v35.355l-119.496-119.496-17.678 17.678 137.174 137.174v35.397l-154.851-154.851-17.677 17.677 172.528 172.528v3.961c0 27.614-22.385 50-50 50h-109.618c4.128-39.908-9.142-81.331-39.788-111.978l-61.52-61.518-61.517-61.518c-24.497-24.498-24.568-64.143-.161-88.55 24.407-24.407 64.053-24.335 88.549.161l8.484 8.484v106.067l159.1-159.1h-106.067l-8.484-8.484c-53.893-53.893-141.111-54.051-194.808-.354s-53.539 140.916.354 194.809l61.518 61.518 61.519 61.518c16.006 16.006 21.584 38.48 16.719 58.945zm0 0" fill="#4B86C2"/>
</svg>

After

Width:  |  Height:  |  Size: 763 B

BIN
pictures/picture.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

1014
shower.js

File diff suppressed because it is too large Load Diff

6
shower.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,84 +0,0 @@
module.exports = {
// --------------------------------
// Click
// --------------------------------
'Click on slide is switching from List to Full': function (test) {
test
.open('http://localhost:7497/tests/')
.click('[id="1"]')
.assert.attr('body', 'class').to.contain('full', 'Mode is Full')
.done();
},
// --------------------------------
// Walking
// --------------------------------
'All slides could be switched from first to last in List mode': function (test) {
test
.open('http://localhost:7497/tests/#1')
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.assert.attr('[id="6"]', 'class').to.contain('active', 'Last slide is Active')
.done();
},
'All slides could be switched from last to first in List mode': function (test) {
test
.open('http://localhost:7497/tests/#6')
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.assert.attr('[id="1"]', 'class').to.contain('active', 'First slide is Active')
.done();
},
'All slides could be switched from first to last in Full mode': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.assert.attr('[id="6"]', 'class').to.contain('active', 'Last slide is Active')
.done();
},
'All slides could be switched from last to first in Full mode': function (test) {
test
.open('http://localhost:7497/tests/?full#6')
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.assert.attr('[id="1"]', 'class').to.contain('active', 'First slide is Active')
.done();
},
// --------------------------------
// Back
// --------------------------------
'Back is switching from Full to List': function (test) {
test
.open('http://localhost:7497/tests/')
.click('[id="1"]')
.back()
.assert.attr('body', 'class').to.contain('list', 'Mode is List')
.done();
},
// --------------------------------
// Zoom
// --------------------------------
'Back from Full to List is restoring scale': function (test) {
test
.open('http://localhost:7497/tests/')
.click('[id="1"]')
.back()
.assert.attr('body', 'style').to.contain('none', 'Scale is restored')
.done();
}
};

View File

@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test page for Shower</title>
<meta charset="utf-8">
<meta name="viewport" content="width=792, user-scalable=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="../themes/ribbon/styles/screen.css">
</head>
<body class="list">
<section class="slide"><div>
<h2>1</h2>
</div></section>
<section class="slide"><div>
<h2>2</h2>
</div></section>
<section class="slide" data-timing="00:03"><div>
<h2>3</h2>
</div></section>
<section class="slide"><div>
<h2>4</h2>
</div></section>
<section class="slide"><div>
<h2>5</h2>
<div class="next">1</div>
<div class="next">2</div>
<div class="next">3</div>
</div></section>
<section class="slide"><div>
<h2>6</h2>
</div></section>
<script src="../shower.js"></script>
</body>
</html>

View File

@ -1,54 +0,0 @@
module.exports = {
'Navigation doesnt work in List mode': function (test) {
test
.open('http://localhost:7497/tests/#5')
.sendKeys('body', '\uE014') // Right
.assert.attr('[id="6"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
'Right Arrow key is switching first Next item to Active': function (test) {
test
.open('http://localhost:7497/tests/?full#5')
.sendKeys('body', '\uE014') // Right
.assert.attr('[id="5"] .next:first-of-type', 'class').to.contain('active', 'First Next item is Active')
.done();
},
'Left Arrow key is switching Active items back to Next': function (test) {
test
.open('http://localhost:7497/tests/?full#5')
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE012') // Left
.sendKeys('body', '\uE012') // Left
.assert.numberOfElements('[id="5"] .next.active', 0, 'There are no Active items')
.done();
},
'Right Arrow key is switching to next slide once all Next items becomes Active': function (test) {
test
.open('http://localhost:7497/tests/?full#5')
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.assert.attr('[id="6"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
'Left Arrow key is switching to previous slide when all Next items becomes Active': function (test) {
test
.open('http://localhost:7497/tests/?full#5')
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE014') // Right
.sendKeys('body', '\uE012') // Left
.assert.attr('[id="4"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
'Reload reset navigation': function (test) {
test
.open('http://localhost:7497/tests/?full#5')
.sendKeys('body', '\uE014') // Right
.reload()
.assert.numberOfElements('[id="5"] .next.active', 0, 'There are no Active items')
.done();
}
};

View File

@ -1,250 +0,0 @@
module.exports = {
// --------------------------------
// F5
// --------------------------------
'F5 is switching from List to Full': function (test) {
test
.open('http://localhost:7497/tests/')
.sendKeys('body', '\uE035') // F5
.assert.attr('body', 'class').to.contain('full', 'Mode is Full')
.done();
},
'F5 is switching from Full to List': function (test) {
test
.open('http://localhost:7497/tests/?full')
.sendKeys('body', '\uE035') // F5
.assert.attr('body', 'class').to.contain('list', 'Mode is List')
.done();
},
// --------------------------------
// Cmd Alt P
// --------------------------------
'Cmd Alt P keys are switching from List to Full': function (test) {
test
.open('http://localhost:7497/tests/')
.sendKeys('body', '\uE03D\uE00A\u0070') // Cmd Alt P
.assert.attr('body', 'class').to.contain('full', 'Mode is Full')
.done();
},
'Cmd Alt P keys are not switching from Full to List': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE03D\uE00A\u0070') // Cmd Alt P
.assert.attr('body', 'class').to.contain('full', 'Mode is Full')
.done();
},
// --------------------------------
// Esc
// --------------------------------
'Esc is switching from Full to List': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE00C') // Esc
.assert.attr('body', 'class').to.contain('list', 'Mode is List')
.done();
},
// --------------------------------
// Left
// --------------------------------
'Left Arrow key is switching to the previous slide': function (test) {
test
.open('http://localhost:7497/tests/?full#2')
.sendKeys('body', '\uE012') // Left
.assert.attr('[id="1"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
// --------------------------------
// Right
// --------------------------------
'Right Arrow key is switching to the next slide': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE014') // Right
.assert.attr('[id="2"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
// --------------------------------
// Up
// --------------------------------
'Up Arrow key is switching to the previous slide': function (test) {
test
.open('http://localhost:7497/tests/?full#2')
.sendKeys('body', '\uE013') // Up
.assert.attr('[id="1"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
// --------------------------------
// Down
// --------------------------------
'Down Arrow key is switching to the next slide': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE015') // Down
.assert.attr('[id="2"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
// --------------------------------
// H
// --------------------------------
'H key is switching to the previous slide': function (test) {
test
.open('http://localhost:7497/tests/?full#2')
.sendKeys('body', '\u0068') // H
.assert.attr('[id="1"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
// --------------------------------
// K
// --------------------------------
'K key is switching to the previous slide': function (test) {
test
.open('http://localhost:7497/tests/?full#2')
.sendKeys('body', '\u006B') // K
.assert.attr('[id="1"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
// --------------------------------
// J
// --------------------------------
'J key is switching to the next slide': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\u006A') // J
.assert.attr('[id="2"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
// --------------------------------
// L
// --------------------------------
'L key is switching to the next slide': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\u006C') // L
.assert.attr('[id="2"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
// --------------------------------
// Space
// --------------------------------
'Space key is switching to the next slide': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE00D') // Space
.assert.attr('[id="2"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
'Shift Space keys are switching to the previous slide': function (test) {
test
.open('http://localhost:7497/tests/?full#2')
.sendKeys('body', '\uE008\uE00D') // Shift Space
.assert.attr('[id="1"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
// --------------------------------
// Tab
// --------------------------------
'Tab key is switching to the next slide': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE004') // Tab
// Not sure why its failing. It works fine manually
.assert.attr('[id="2"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
'Shift Tab keys are switching to the previous slide': function (test) {
test
.open('http://localhost:7497/tests/?full#2')
.sendKeys('body', '\uE008\uE004') // Shift Tab
// Not sure why its failing. It works fine manually
.assert.attr('[id="1"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
// --------------------------------
// PageUp
// --------------------------------
'PageUp key is switching to the previous slide': function (test) {
test
.open('http://localhost:7497/tests/?full#2')
.sendKeys('body', '\uE00E') // PageUp
.assert.attr('[id="1"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
// --------------------------------
// PageDown
// --------------------------------
'PageDown key is switching to the next slide': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE00F') // PageDown
.assert.attr('[id="2"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
// --------------------------------
// Home
// --------------------------------
'Home key select the first slide in List mode': function (test) {
test
.open('http://localhost:7497/tests/')
.sendKeys('body', '\uE011') // Home
// Failing unlike next one with current slide
.assert.attr('[id="1"]', 'class').to.contain('active', 'First slide is active')
.done();
},
'Home key select the first slide in List mode (with current)': function (test) {
test
.open('http://localhost:7497/tests/#5')
.sendKeys('body', '\uE011') // Home
.assert.attr('[id="1"]', 'class').to.contain('active', 'First slide is active')
.done();
},
'Home key select the first slide in Full mode': function (test) {
test
.open('http://localhost:7497/tests/?full#5')
.sendKeys('body', '\uE011') // Home
.assert.attr('[id="1"]', 'class').to.contain('active', 'First slide is active')
.done();
},
// --------------------------------
// End
// --------------------------------
'End key select the last slide in List mode': function (test) {
test
.open('http://localhost:7497/tests/')
.sendKeys('body', '\uE010') // End
// Failing unlike next one with current slide
.assert.attr('[id="6"]', 'class').to.contain('active', 'Last slide is active')
.done();
},
'End key select the last slide in List mode (with current)': function (test) {
test
.open('http://localhost:7497/tests/#1')
.sendKeys('body', '\uE010') // End
.assert.attr('[id="6"]', 'class').to.contain('active', 'Last slide is active')
.done();
},
'End key select the last slide in Full mode': function (test) {
test
.open('http://localhost:7497/tests/?full#1')
.sendKeys('body', '\uE010') // End
.assert.attr('[id="6"]', 'class').to.contain('active', 'Last slide is active')
.done();
},
// --------------------------------
// Enter
// --------------------------------
'Enter is opening current slide': function (test) {
test
.open('http://localhost:7497/tests/#1')
.sendKeys('body', '\uE007') // Enter
.assert.attr('body', 'class', 'full', 'Full mode')
.assert.attr('[id="1"]', 'class').to.contain('active', 'First slide is active')
.done();
},
'Enter is not opening any slide if theres no current': function (test) {
test
.open('http://localhost:7497/tests/')
.sendKeys('body', '\uE007') // Enter
.assert.attr('body', 'class', 'list', 'Mode is List')
.done();
}
};

View File

@ -1,31 +0,0 @@
module.exports = {
'Timer is switching to the next slide when finished': function (test) {
test
.open('http://localhost:7497/tests/?full#3')
.wait(5000)
.assert.attr('[id="4"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
'Timer becomes Active and switching to the next slide when finished': function (test) {
test
.open('http://localhost:7497/tests/?full#4')
.sendKeys('body', '\uE012') // Left
.wait(5000)
.assert.attr('[id="4"]', 'class').to.contain('active', 'Next slide is Active')
.done();
},
'Left Arrow key is skipping timer while its not finished': function (test) {
test
.open('http://localhost:7497/tests/?full#3')
.sendKeys('body', '\uE012') // Left
.assert.attr('[id="2"]', 'class').to.contain('active', 'Previous slide is Active')
.done();
},
'Right Arrow key is skipping timer while its not finished': function (test) {
test
.open('http://localhost:7497/tests/?full#3')
.sendKeys('body', '\uE014') // Right
.assert.attr('[id="4"]', 'class').to.contain('active', 'Next slide is Active')
.done();
}
};

@ -1 +0,0 @@
Subproject commit 2ba8abeb2b23b3c202472e02eff4f68adc13bf25

@ -1 +0,0 @@
Subproject commit b79263a6bf1b81cf8793077718fcbe0e0f2833db