Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
168e032d
Commit
168e032d
authored
Nov 15, 2013
by
Thibaut Frain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update path to gadget in tests to pass test suite in erp5
parent
bbdf5cf2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
8 deletions
+102
-8
test/bw-gadget-test.js
test/bw-gadget-test.js
+1
-1
test/jqs-gadget-test.js
test/jqs-gadget-test.js
+100
-6
test_launcher_for_officejs/tests/testOfficeJS.py
test_launcher_for_officejs/tests/testOfficeJS.py
+1
-1
No files found.
test/bw-gadget-test.js
View file @
168e032d
...
...
@@ -14,7 +14,7 @@ QUnit.config.testTimeout = 1000;
//expect = QUnit.expect,
//throws = QUnit.throws,
//deepEqual = QUnit.deepEqual;
bwGadgetURL
=
'
../
deploy
/gadget/bootstrap-wysiwyg.html
'
;
bwGadgetURL
=
'
../
src
/gadget/bootstrap-wysiwyg.html
'
;
function
iframeSelector
(
selectorString
)
{
return
$
(
'
iframe
'
).
contents
().
find
(
selectorString
);
...
...
test/jqs-gadget-test.js
View file @
168e032d
...
...
@@ -10,7 +10,7 @@ QUnit.config.testTimeout = 1000;
start
=
QUnit
.
start
,
ok
=
QUnit
.
ok
,
equal
=
QUnit
.
equal
,
jqsGadgetURL
=
'
../
deploy
/gadget/jqs.html
'
;
jqsGadgetURL
=
'
../
src
/gadget/jqs.html
'
;
function
iframeSelector
(
selectorString
)
{
return
$
(
'
iframe
'
).
contents
().
find
(
selectorString
);
...
...
@@ -25,7 +25,7 @@ QUnit.config.testTimeout = 1000;
var
g
=
rJS
(
this
),
gadget_context
=
g
.
context
.
find
(
'
#gadget
'
).
first
();
asyncTest
(
"
jquery.sheet loading
: sheet loads
"
,
2
,
function
()
{
asyncTest
(
"
(iframe) jquery.sheet loading
: sheet loads
"
,
2
,
function
()
{
var
c0r0
=
buildSelector
(
0
,
0
,
0
);
var
c1r1
=
buildSelector
(
0
,
1
,
1
);
...
...
@@ -37,7 +37,7 @@ QUnit.config.testTimeout = 1000;
.
always
(
start
);
});
asyncTest
(
"
jquery.sheet loading
: sheet is empty
"
,
2
,
function
()
{
asyncTest
(
"
(iframe) jquery.sheet loading
: sheet is empty
"
,
2
,
function
()
{
var
c0r0
=
buildSelector
(
0
,
0
,
0
);
var
c1r1
=
buildSelector
(
0
,
1
,
1
);
...
...
@@ -49,7 +49,7 @@ QUnit.config.testTimeout = 1000;
.
always
(
start
);
});
asyncTest
(
"
clear content
"
,
2
,
function
()
{
asyncTest
(
"
(iframe)
clear content
"
,
2
,
function
()
{
var
c0r0
=
buildSelector
(
0
,
0
,
0
);
var
c1r1
=
buildSelector
(
0
,
1
,
1
);
...
...
@@ -68,7 +68,7 @@ QUnit.config.testTimeout = 1000;
.
always
(
start
);
});
asyncTest
(
"
get content of sheet
"
,
2
,
function
()
{
asyncTest
(
"
(iframe)
get content of sheet
"
,
2
,
function
()
{
var
c0r0
=
buildSelector
(
0
,
0
,
0
);
var
c1r1
=
buildSelector
(
0
,
1
,
1
);
...
...
@@ -88,7 +88,7 @@ QUnit.config.testTimeout = 1000;
.
always
(
start
);
});
asyncTest
(
"
set content of sheet
"
,
4
,
function
()
{
asyncTest
(
"
(iframe)
set content of sheet
"
,
4
,
function
()
{
var
gadget
,
content
,
t0c0r0
=
buildSelector
(
0
,
0
,
0
),
t0c1r1
=
buildSelector
(
0
,
1
,
1
),
...
...
@@ -118,6 +118,100 @@ QUnit.config.testTimeout = 1000;
.
always
(
start
);
});
asyncTest
(
"
jquery.sheet loading : sheet loads
"
,
2
,
function
()
{
var
c0r0
=
buildSelector
(
0
,
0
,
0
);
var
c1r1
=
buildSelector
(
0
,
1
,
1
);
g
.
declareGadget
(
jqsGadgetURL
,
gadget_context
)
.
then
(
function
()
{
ok
(
$
(
c0r0
).
length
!=
0
);
ok
(
$
(
c1r1
).
length
!=
0
);
})
.
always
(
start
);
});
asyncTest
(
"
jquery.sheet loading: sheet is empty
"
,
2
,
function
()
{
var
c0r0
=
buildSelector
(
0
,
0
,
0
);
var
c1r1
=
buildSelector
(
0
,
1
,
1
);
g
.
declareIframedGadget
(
jqsGadgetURL
,
gadget_context
)
.
then
(
function
()
{
equal
(
$
(
c0r0
).
html
(),
""
);
equal
(
$
(
c1r1
).
html
(),
""
);
})
.
always
(
start
);
});
asyncTest
(
"
clear content
"
,
2
,
function
()
{
var
c0r0
=
buildSelector
(
0
,
0
,
0
);
var
c1r1
=
buildSelector
(
0
,
1
,
1
);
g
.
declareIframedGadget
(
jqsGadgetURL
,
gadget_context
)
.
then
(
function
(
gadget
)
{
$
(
c0r0
).
html
(
'
c0r0Value
'
);
$
(
c1r1
).
html
(
'
c1r1Value
'
);
return
gadget
;
})
.
then
(
function
(
gadget
)
{
return
gadget
.
clearContent
().
then
(
function
()
{
equal
(
$
(
c0r0
).
text
(),
""
);
equal
(
$
(
c1r1
).
text
(),
""
);
});
})
.
always
(
start
);
});
asyncTest
(
"
get content of sheet
"
,
2
,
function
()
{
var
c0r0
=
buildSelector
(
0
,
0
,
0
);
var
c1r1
=
buildSelector
(
0
,
1
,
1
);
g
.
declareIframedGadget
(
jqsGadgetURL
,
gadget_context
)
.
then
(
function
(
gadget
)
{
$
(
c0r0
).
html
(
'
c0r0Value
'
);
$
(
c1r1
).
html
(
'
c1r1Value
'
);
return
gadget
;
})
.
then
(
function
(
gadget
)
{
return
gadget
.
getContent
().
then
(
function
(
content
)
{
var
json
=
JSON
.
parse
(
content
)[
0
];
equal
(
json
.
data
.
r0
.
c0
.
value
,
"
c0r0Value
"
);
equal
(
json
.
data
.
r1
.
c1
.
value
,
"
c1r1Value
"
);
});
})
.
always
(
start
);
});
asyncTest
(
"
set content of sheet
"
,
4
,
function
()
{
var
gadget
,
content
,
t0c0r0
=
buildSelector
(
0
,
0
,
0
),
t0c1r1
=
buildSelector
(
0
,
1
,
1
),
t2c0r0
=
buildSelector
(
2
,
0
,
0
),
t2c1r1
=
buildSelector
(
2
,
1
,
1
);
g
.
declareIframedGadget
(
jqsGadgetURL
,
gadget_context
)
.
then
(
function
(
gd
)
{
$
(
t0c0r0
).
html
(
'
c0r0Value
'
);
$
(
t0c1r1
).
html
(
'
c1r1Value
'
);
gadget
=
gd
;
return
gadget
.
getContent
();
})
.
then
(
function
(
c
)
{
content
=
c
;
return
gadget
.
clearContent
();
})
.
then
(
function
()
{
equal
(
$
(
t0c0r0
).
text
(),
""
);
equal
(
$
(
t2c1r1
).
text
(),
""
);
return
gadget
.
setContent
(
content
);
})
.
then
(
function
()
{
equal
(
$
(
t2c0r0
).
text
(),
"
c0r0Value
"
);
equal
(
$
(
t2c1r1
).
text
(),
"
c1r1Value
"
);
})
.
always
(
start
);
});
});
}
(
window
,
jQuery
,
QUnit
,
rJS
));
test_launcher_for_officejs/tests/testOfficeJS.py
View file @
168e032d
...
...
@@ -13,7 +13,7 @@ class OFFICEJSTest(TestCase):
"""
Launch officejs test without requirejs
"""
root_directory
=
__file__
[
0
:
-
len
(
"parts/officejs/test_launcher_for_officejs/tests/testOfficeJS.py"
)]
root_directory
=
__file__
[
0
:
-
len
(
"
/
parts/officejs/test_launcher_for_officejs/tests/testOfficeJS.py"
)]
command
=
[
"%s %s %s; exit 0"
%
(
'%s/bin/phantomjs'
%
root_directory
,
'%s/parts/officejs/test/run-qunit.js'
%
root_directory
,
...
...
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