Commit 6bad2b6b authored by Tejesh's avatar Tejesh 🖖

TST: test case for options.columns as a comma separated list, test case for...

TST:  test case for options.columns as a comma separated list, test case for when columns are not mentioned at all
parent fb6b9c60
Pipeline #84304 passed with stage
in 2 minutes and 34 seconds
......@@ -35,6 +35,8 @@
<body>
<div class="no-link" data-src="/formhandler-data"></div>
<div class="star_order" data-src="/formhandler-data"></div>
<div class="star_order2" data-src="/formhandler-data"></div>
<div class="row_template1" data-src="/formhandler-data"></div>
<div class="delete_btn" data-src="/formhandler-data"></div>
<div class="test-star-without-title" data-src="/formhandler-data"></div>
......@@ -48,6 +50,29 @@
<script>
tape('$() test * column retains order when columns is a comma seperated string', function(t) {
$('.star_order').formhandler({
columns: 'Stripes,*,ID',
pageSize: 2
})
.on('load', function(args) {
t.equals($('.star_order th').get(0).getAttribute('data-col'), 'Stripes')
t.equals($('.star_order th').get(args.meta.columns.length-1).getAttribute('data-col'), 'ID')
t.end()
})
})
tape('$() test * column retains order when columns are not mentioned at all', function(t) {
$('.star_order2').formhandler({
pageSize: 2
})
.on('load', function(args) {
t.equals($('.star_order2 th').get(0).getAttribute('data-col'), 'Continent')
t.equals($('.star_order2 th').get(args.meta.columns.length-1).getAttribute('data-col'), 'Bool Col')
t.end()
})
})
tape('$() test link false renders just td tag, without a tag', function(t) {
$('.no-link').formhandler({
columns: [
......
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