Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
my-cucumbers-ru-github-io
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Лотуга Данила Сергеевич
my-cucumbers-ru-github-io
Commits
50596cb8
Commit
50596cb8
authored
Feb 18, 2014
by
Vadim Makeev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New basic tests, updated navigation and shortcuts
parent
e4b79d06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
5 deletions
+96
-5
basic.js
tests/basic.js
+84
-0
navigation.js
tests/navigation.js
+8
-1
shortcuts.js
tests/shortcuts.js
+4
-4
No files found.
tests/basic.js
0 → 100644
View file @
50596cb8
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
();
}
};
\ No newline at end of file
tests/navigation.js
View file @
50596cb8
module
.
exports
=
{
'Navigation doesn’t 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'
)
...
...
@@ -30,10 +37,10 @@ module.exports = {
test
.
open
(
'http://localhost:7497/tests/?full#5'
)
.
sendKeys
(
'body'
,
'
\
uE014'
)
// Right
.
screenshot
(
'tests/1.png'
)
.
sendKeys
(
'body'
,
'
\
uE014'
)
// Right
.
sendKeys
(
'body'
,
'
\
uE014'
)
// Right
.
sendKeys
(
'body'
,
'
\
uE012'
)
// Left
// Not sure why it’s failing. It works fine manually
.
assert
.
attr
(
'[id="4"]'
,
'class'
).
to
.
contain
(
'active'
,
'Previous slide is Active'
)
.
done
();
},
...
...
tests/shortcuts.js
View file @
50596cb8
...
...
@@ -6,14 +6,14 @@ module.exports = {
test
.
open
(
'http://localhost:7497/tests/'
)
.
sendKeys
(
'body'
,
'
\
uE035'
)
// F5
.
assert
.
attr
(
'body'
,
'class'
,
'full'
,
'Mode is Full'
)
.
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'
,
'list'
,
'Mode is List'
)
.
assert
.
attr
(
'body'
,
'class'
).
to
.
contain
(
'list'
,
'Mode is List'
)
.
done
();
},
// --------------------------------
...
...
@@ -23,14 +23,14 @@ module.exports = {
test
.
open
(
'http://localhost:7497/tests/'
)
.
sendKeys
(
'body'
,
'
\
uE03D
\
uE00A
\
u0070'
)
// Cmd Alt P
.
assert
.
attr
(
'body'
,
'class'
,
'full'
,
'Mode is Full'
)
.
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'
,
'full'
,
'Mode is Full'
)
.
assert
.
attr
(
'body'
,
'class'
).
to
.
contain
(
'full'
,
'Mode is Full'
)
.
done
();
},
// --------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment