Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
b3400aee
Commit
b3400aee
authored
Dec 07, 2014
by
Addy Osmani
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1080 from tastejs/browser-test-loop
Browser tests: Flatten loop
parents
2384a51c
822b030d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
browser-tests/testOperations.js
browser-tests/testOperations.js
+5
-10
No files found.
browser-tests/testOperations.js
View file @
b3400aee
...
...
@@ -113,18 +113,13 @@ function TestOperations(page) {
// obtain all the visible items
var
visibleLabels
=
[];
var
tests
=
[];
for
(
var
i
=
0
;
i
<
labels
.
length
;
i
++
)
{
(
function
(
index
)
{
// suppressing JSHint - the loop variable is not being used in the function.
/* jshint -W083 */
tests
.
push
(
labels
[
index
].
isDisplayed
().
then
(
function
(
isDisplayed
)
{
var
tests
=
labels
.
map
(
function
(
label
)
{
return
label
.
isDisplayed
().
then
(
function
(
isDisplayed
)
{
if
(
isDisplayed
)
{
visibleLabels
.
push
(
label
s
[
index
]
);
visibleLabels
.
push
(
label
);
}
}));
})(
i
);
}
});
});
// check that they match the supplied text
return
Q
.
all
(
tests
).
then
(
function
()
{
...
...
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