From ce471de77aa93bd2f6516c12f0b8e989382acf86 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 30 Nov 2024 11:45:59 +0000 Subject: Convert checkbox to HTML --- test/document-to-html.tests.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') diff --git a/test/document-to-html.tests.js b/test/document-to-html.tests.js index a18c4f5..8dc1e60 100644 --- a/test/document-to-html.tests.js +++ b/test/document-to-html.tests.js @@ -465,6 +465,22 @@ test('hyperlink target frame is used as anchor target', function() { }); }); +test('unchecked checkbox is converted to unchecked checkbox input', function() { + var checkbox = documents.checkbox({checked: false}); + var converter = new DocumentConverter(); + return converter.convertToHtml(checkbox).then(function(result) { + assert.equal(result.value, ''); + }); +}); + +test('checked checkbox is converted to checked checkbox input', function() { + var checkbox = documents.checkbox({checked: true}); + var converter = new DocumentConverter(); + return converter.convertToHtml(checkbox).then(function(result) { + assert.equal(result.value, ''); + }); +}); + test('bookmarks are converted to anchors', function() { var bookmarkStart = new documents.BookmarkStart({name: "_Peter"}); var converter = new DocumentConverter({ -- cgit v1.2.3