Commit cc0db348 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

tests: update tests, mainly removing spaces

See #2338.
parent a85bd72e
......@@ -134,36 +134,36 @@ QUnit.test("name, informations, getHtmlInfo", function(assert) {
assert.includes(html, "<h2>Cluster info : hello</h2><div id='info_window'><table><tr><th></th><td>Diag</td><td>Fu-1</td><td>Fu-2</td><td>Fu-3</td></tr>",
"getHtmlInfo: cluster info");
assert.includes(html, "<tr><td> clone name </td><td colspan='4'>hello</td></tr><tr><td> clone short name </td><td colspan='4'>hello</td></tr>",
assert.includes(html, "<tr><td>clone name</td><td colspan='4'>hello</td></tr><tr><td>clone short name</td><td colspan='4'>hello</td></tr>",
"getHtmlInfo: clone names")
assert.includes(html, "<tr><td> clone size (n-reads (total reads) )</td><td>20 (200)</td><td>20 (100)</td><td>30 (200)</td><td>30 (100)</td></tr><tr><td> clone size (%)</td><td>10.00%</td><td>20.00%</td><td>15.00%</td><td>30.00%</td>",
assert.includes(html, "<tr><td>clone size (n-reads (total reads))</td><td>20 (200)</td><td>20 (100)</td><td>30 (200)</td><td>30 (100)</td></tr><tr><td>clone size (%)</td><td>10.00%</td><td>20.00%</td><td>15.00%</td><td>30.00%</td>",
"getHtmlInfo: clone information");
assert.includes(html, "<tr><td class='header' colspan='5'> representative sequence</td></tr><tr><td> sequence name </td><td colspan='4'>hello</td></tr><tr><td> code </td><td colspan='4'>hello</td></tr><tr><td> length </td><td colspan='4'>19</td></tr><tr><td> e-value </td><td colspan='4'><span class='warning'>0.01</span></td><tr><td> size (n-reads (total reads) )</td><td>10 (200)</td><td>10 (100)</td><td>0 (200)</td><td>30 (100)</td></tr><tr><td> size (%)</td><td>5.000%</td><td>10.00%</td><td>-</td><td>30.00%</td></tr>",
assert.includes(html, "<tr><td class='header' colspan='5'>representative sequence</td></tr><tr><td>sequence name</td><td colspan='4'>hello</td></tr><tr><td>code</td><td colspan='4'>hello</td></tr><tr><td>length</td><td colspan='4'>19</td></tr><tr><td>e-value</td><td colspan='4'><span class='warning'>0.01</span></td></tr><tr><td>size (n-reads (total reads))</td><td>10 (200)</td><td>10 (100)</td><td>0 (200)</td><td>30 (100)</td></tr><tr><td>size (%)</td><td>5.000%</td><td>10.00%</td><td>-</td><td>30.00%</td></tr>",
"getHtmlInfo: representative sequence information");
assert.includes(html, "<tr><td class='header' colspan='5'> segmentation <button type='button' onclick='m.clones[0].toggle()'>edit</button> </td></tr><tr><td> sequence </td><td colspan='4'>aaaaaaaaaattttttttt</td></tr><tr><td> id </td><td colspan='4'>id1</td></tr>",
assert.includes(html, "<tr><td class='header' colspan='5'>segmentation <button type='button' onclick='m.clones[0].toggle()'>edit</button></td></tr><tr><td>sequence</td><td colspan='4'>aaaaaaaaaattttttttt</td></tr><tr><td>id</td><td colspan='4'>id1</td></tr>",
"getHtmlInfo: segmentation information + modification button");
// Test icon
m.clones[0].segEdited = true;
html = m.clones[0].getHtmlInfo();
assert.includes(html, "<tr><td class='header' colspan='5'> segmentation <button type='button' onclick='m.clones[0].toggle()'>edit</button> <img src='images/icon_fav_on.png' alt='This clone has been edited by a user'></td></tr><tr><td> sequence </td><td colspan='4'>aaaaaaaaaattttttttt</td></tr><tr><td> id </td><td colspan='4'>id1</td></tr>",
assert.includes(html, "<tr><td class='header' colspan='5'>segmentation <button type='button' onclick='m.clones[0].toggle()'>edit</button> <img src='images/icon_fav_on.png' alt='This clone has been edited by a user'></td></tr><tr><td>sequence</td><td colspan='4'>aaaaaaaaaattttttttt</td></tr><tr><td>id</td><td colspan='4'>id1</td></tr>",
"getHtmlInfo: segmentation information + modification button + manuallyChanged icon");
// <tr><td> locus </td><td colspan='4'><span title=\"TRG\" class=\"systemBoxMenu\">G</span>TRG</td></tr> // not tested (order of title/class)
// <tr><td>locus</td><td colspan='4'><span title=\"TRG\" class=\"systemBoxMenu\">G</span>TRG</td></tr> // not tested (order of title/class)
// locus/genes content tests
// TODO correct this locus test/function for chromium/firefox (inversion des balises)
/*assert.includes(html, "<tr><td> locus </td><td colspan='4'><span title=\"TRG\" class=\"systemBoxMenu\">G</span>TRG<div class='div-menu-selector' id='listLocus' style='display: none'>",
/*assert.includes(html, "<tr><td>locus</td><td colspan='4'><span title=\"TRG\" class=\"systemBoxMenu\">G</span>TRG<div class='div-menu-selector' id='listLocus' style='display: none'>",
"getHtmlInfo: segmentation information (Locus)");*/
assert.includes(html, "<tr><td> V gene (or 5') </td><td colspan='4'>undefined V<div class='div-menu-selector' id='listVsegment' style='display: none'>",
assert.includes(html, "<tr><td>V gene (or 5')</td><td colspan='4'>undefined V<div class='div-menu-selector' id='listVsegment' style='display: none'>",
"getHtmlInfo: segmentation information (V gene)");
assert.includes(html, "<tr><td> (D gene) </td><td colspan='4'>IGHD2*03<div class='div-menu-selector' id='listDsegment' style='display: none'>",
assert.includes(html, "<tr><td>(D gene)</td><td colspan='4'>IGHD2*03<div class='div-menu-selector' id='listDsegment' style='display: none'>",
"getHtmlInfo: segmentation information (D gene)");
assert.includes(html, "<tr><td> J gene (or 3') </td><td colspan='4'>IGHV4*01<div class='div-menu-selector' id='listJsegment' style='display: none'>",
assert.includes(html, "<tr><td>J gene (or 3')</td><td colspan='4'>IGHV4*01<div class='div-menu-selector' id='listJsegment' style='display: none'>",
"getHtmlInfo: segmentation information (J gene)");
// forms tests
......@@ -186,7 +186,7 @@ QUnit.test("name, informations, getHtmlInfo", function(assert) {
"<option value=IGH>IGH</option><option value=TRA>TRA</option>",
"getHtmlInfo: first options in select locus (after changment)"); // after germline changment
assert.includes(html,
"<tr><td> V gene (or 5') </td><td colspan='4'>testV5<div class='div-menu-selector' id='listVsegment' style='display: none'>",
"<tr><td>V gene (or 5')</td><td colspan='4'>testV5<div class='div-menu-selector' id='listVsegment' style='display: none'>",
"getHtmlInfo: segmentation information (V gene) after changment");
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment