Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
c3-closed
Project
Project
Details
Activity
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Evgeny
c3-closed
Commits
60047439
Commit
60047439
authored
Feb 10, 2015
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec for api.focus
parent
6dd093fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
api.focus-spec.js
spec/api.focus-spec.js
+26
-26
No files found.
spec/api.focus-spec.js
View file @
60047439
describe
(
'c3 api
load
'
,
function
()
{
describe
(
'c3 api
focus
'
,
function
()
{
'use strict'
;
'use strict'
;
var
chart
,
d3
;
var
chart
,
d3
;
...
@@ -37,7 +37,7 @@ describe('c3 api load', function () {
...
@@ -37,7 +37,7 @@ describe('c3 api load', function () {
expect
(
item
.
classed
(
'c3-legend-item-focused'
)).
toBeTruthy
();
expect
(
item
.
classed
(
'c3-legend-item-focused'
)).
toBeTruthy
();
});
});
done
();
done
();
},
5
00
);
},
10
00
);
});
});
it
(
'should focus one target'
,
function
(
done
)
{
it
(
'should focus one target'
,
function
(
done
)
{
...
@@ -62,7 +62,7 @@ describe('c3 api load', function () {
...
@@ -62,7 +62,7 @@ describe('c3 api load', function () {
expect
(
legendItems
.
data2
.
classed
(
'c3-legend-item-focused'
)).
toBeTruthy
();
expect
(
legendItems
.
data2
.
classed
(
'c3-legend-item-focused'
)).
toBeTruthy
();
expect
(
legendItems
.
data3
.
classed
(
'c3-legend-item-focused'
)).
toBeFalsy
();
expect
(
legendItems
.
data3
.
classed
(
'c3-legend-item-focused'
)).
toBeFalsy
();
done
();
done
();
},
5
00
);
},
10
00
);
});
});
it
(
'should focus multiple targets'
,
function
(
done
)
{
it
(
'should focus multiple targets'
,
function
(
done
)
{
...
@@ -87,7 +87,7 @@ describe('c3 api load', function () {
...
@@ -87,7 +87,7 @@ describe('c3 api load', function () {
expect
(
legendItems
.
data2
.
classed
(
'c3-legend-item-focused'
)).
toBeTruthy
();
expect
(
legendItems
.
data2
.
classed
(
'c3-legend-item-focused'
)).
toBeTruthy
();
expect
(
legendItems
.
data3
.
classed
(
'c3-legend-item-focused'
)).
toBeFalsy
();
expect
(
legendItems
.
data3
.
classed
(
'c3-legend-item-focused'
)).
toBeFalsy
();
done
();
done
();
},
5
00
);
},
10
00
);
});
});
});
});
...
@@ -112,7 +112,7 @@ describe('c3 api load', function () {
...
@@ -112,7 +112,7 @@ describe('c3 api load', function () {
expect
(
+
item
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
item
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
});
});
done
();
done
();
},
5
00
);
},
10
00
);
});
});
it
(
'should defocus one target'
,
function
(
done
)
{
it
(
'should defocus one target'
,
function
(
done
)
{
...
@@ -140,7 +140,7 @@ describe('c3 api load', function () {
...
@@ -140,7 +140,7 @@ describe('c3 api load', function () {
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
done
();
done
();
},
5
00
);
},
10
00
);
});
});
it
(
'should defocus multiple targets'
,
function
(
done
)
{
it
(
'should defocus multiple targets'
,
function
(
done
)
{
...
@@ -168,7 +168,7 @@ describe('c3 api load', function () {
...
@@ -168,7 +168,7 @@ describe('c3 api load', function () {
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
done
();
done
();
},
5
00
);
},
10
00
);
});
});
it
(
'should defocus multiple targets after focused'
,
function
(
done
)
{
it
(
'should defocus multiple targets after focused'
,
function
(
done
)
{
...
@@ -198,9 +198,9 @@ describe('c3 api load', function () {
...
@@ -198,9 +198,9 @@ describe('c3 api load', function () {
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
done
();
done
();
},
5
00
);
},
10
00
);
});
}
,
1000
);
}
,
500
);
});
});
});
...
@@ -224,8 +224,8 @@ describe('c3 api load', function () {
...
@@ -224,8 +224,8 @@ describe('c3 api load', function () {
expect
(
+
item
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
item
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
});
});
done
();
done
();
},
5
00
);
},
10
00
);
},
5
00
);
},
10
00
);
});
});
it
(
'should revert all targets after defocus'
,
function
(
done
)
{
it
(
'should revert all targets after defocus'
,
function
(
done
)
{
...
@@ -246,8 +246,8 @@ describe('c3 api load', function () {
...
@@ -246,8 +246,8 @@ describe('c3 api load', function () {
expect
(
+
item
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
item
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
});
});
done
();
done
();
},
5
00
);
},
10
00
);
},
5
00
);
},
10
00
);
});
});
it
(
'should revert one target after focus'
,
function
(
done
)
{
it
(
'should revert one target after focus'
,
function
(
done
)
{
...
@@ -274,8 +274,8 @@ describe('c3 api load', function () {
...
@@ -274,8 +274,8 @@ describe('c3 api load', function () {
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
done
();
done
();
},
5
00
);
},
10
00
);
},
5
00
);
},
10
00
);
});
});
it
(
'should revert one target after defocus'
,
function
(
done
)
{
it
(
'should revert one target after defocus'
,
function
(
done
)
{
...
@@ -302,8 +302,8 @@ describe('c3 api load', function () {
...
@@ -302,8 +302,8 @@ describe('c3 api load', function () {
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
done
();
done
();
},
5
00
);
},
10
00
);
},
5
00
);
},
10
00
);
});
});
it
(
'should focus multiple targets after focus'
,
function
(
done
)
{
it
(
'should focus multiple targets after focus'
,
function
(
done
)
{
...
@@ -330,8 +330,8 @@ describe('c3 api load', function () {
...
@@ -330,8 +330,8 @@ describe('c3 api load', function () {
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
done
();
done
();
},
5
00
);
},
10
00
);
},
5
00
);
},
10
00
);
});
});
it
(
'should focus multiple targets after defocus'
,
function
(
done
)
{
it
(
'should focus multiple targets after defocus'
,
function
(
done
)
{
...
@@ -358,8 +358,8 @@ describe('c3 api load', function () {
...
@@ -358,8 +358,8 @@ describe('c3 api load', function () {
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data2
.
style
(
'opacity'
)).
toBeCloseTo
(
1
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
expect
(
+
legendItems
.
data3
.
style
(
'opacity'
)).
toBeCloseTo
(
0.3
);
done
();
done
();
},
5
00
);
},
10
00
);
},
5
00
);
},
10
00
);
});
});
});
});
...
@@ -386,7 +386,7 @@ describe('c3 api load', function () {
...
@@ -386,7 +386,7 @@ describe('c3 api load', function () {
});
});
expect
(
legendItems
.
size
()).
toBeCloseTo
(
0
);
expect
(
legendItems
.
size
()).
toBeCloseTo
(
0
);
done
();
done
();
},
5
00
);
},
10
00
);
});
});
it
(
'should defocus all targets without showing legend'
,
function
(
done
)
{
it
(
'should defocus all targets without showing legend'
,
function
(
done
)
{
...
@@ -402,7 +402,7 @@ describe('c3 api load', function () {
...
@@ -402,7 +402,7 @@ describe('c3 api load', function () {
});
});
expect
(
legendItems
.
size
()).
toBeCloseTo
(
0
);
expect
(
legendItems
.
size
()).
toBeCloseTo
(
0
);
done
();
done
();
},
5
00
);
},
10
00
);
});
});
it
(
'should revert all targets after focus'
,
function
(
done
)
{
it
(
'should revert all targets after focus'
,
function
(
done
)
{
...
@@ -420,8 +420,8 @@ describe('c3 api load', function () {
...
@@ -420,8 +420,8 @@ describe('c3 api load', function () {
});
});
expect
(
legendItems
.
size
()).
toBeCloseTo
(
0
);
expect
(
legendItems
.
size
()).
toBeCloseTo
(
0
);
done
();
done
();
},
5
00
);
},
10
00
);
},
5
00
);
},
10
00
);
});
});
});
});
...
...
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