Skip to content

Commit

Permalink
implemented spanrole respan test #95
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Dec 14, 2016
1 parent 7170da8 commit 4c5cd6e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions flat/style/testflat.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,16 @@ QUnit.asyncTest("[Higher order] Deleting a feature",function(assert){
ui_edit('#higherorderfield_' + idx + '_0',""); //head feature
ui_click('#editorsubmit');
});
QUnit.asyncTest("Span role edit (respan)",function(assert){
testinit("spanrole_respan",assert);
ui_click('#untitleddoc.p.3.s.1.w.11');
var idx = ui_find('dependency');
ui_click('#editform' + idx + 'direct');
ui_click('#spanselector' + idx + '_0'); //head spanrole
ui_click('#untitleddoc.p.3.s.1.w.12b');
ui_click('#spanselector' + idx + '_0');
ui_click('#editorsubmit');
});

QUnit.asyncTest("Tests completed", function(assert){
$('#wait').hide();
Expand Down Expand Up @@ -639,6 +649,9 @@ function testeval(data) {
globalassert.equal(annotations["untitleddoc.p.3.s.1.w.11/pos/http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn-nonexistant"].children[4].class, "testvalue");
} else if ((testname == "feature_delete")) {
globalassert.equal(annotations["untitleddoc.p.3.s.1.w.11/pos/http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn-nonexistant"].children.length, 3);
} else if ((testname == "spanrole_respan")) {
globalassert.equal(annotations["untitleddoc.p.3.s.1.dependencies.1.dependency.10"].children.length, 2);
globalassert.equal(annotations["untitleddoc.p.3.s.1.dependencies.1.dependency.10"].children[0].targets.length, 2);
}

console.log("(testeval) (qunit.start)");
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ def read(fname):
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
],
package_data = {'flat':['templates/*.html','style/*'], 'flat.modes.structureeditor':['templates/*.html'], 'flat.modes.viewer':['templates/*.html'], 'flat.modes.editor':['templates/*.html'], 'flat.modes.metadata':['templates/*.html'] },
install_requires=['pynlpl >= 1.1.1','Django >= 1.8','requests'] + extradeps
install_requires=['pynlpl >= 1.1.2','Django >= 1.8','requests'] + extradeps
)

0 comments on commit 4c5cd6e

Please sign in to comment.