function testListWithItemCount(count) {
      const template =
          print_preview_test_utils.getCddTemplateWithAdvancedSettings(
              count, printerId, printerName);
      destination.capabilities = template.capabilities;
      dialog.destination = destination;

      document.body.appendChild(dialog);
      dialog.show();
      Polymer.dom.flush();

      // Search box should be hidden if there is only 1 item.
      const searchBox = dialog.$.searchBox;
      assertEquals(count == 1, searchBox.hidden);

      // Verify item is displayed.
      const vendorItems = template.capabilities.printer.vendor_capability;
      const items = dialog.shadowRoot.querySelectorAll(
          'print-preview-advanced-settings-item');
      assertEquals(count, items.length);
    }
/**
     * Verifies that the search box is shown or hidden based on the number
     * of capabilities and that the correct number of items are created.
     * @param {number} count The number of vendor capabilities the printer
     *     should have.
     */
Verifies that the search box is shown or hidden based on the number
of capabilities and that the correct number of items are created.
@param {number} count The number of vendor capabilities the printer
should have.
Verifies that the search box is shown or hidden based on the number of capabilities and that the correct number of items are created . @param { number } count The number of vendor capabilities the printer should have .
function testListWithItemCount(count) {
      const template =
          print_preview_test_utils.getCddTemplateWithAdvancedSettings(
              count, printerId, printerName);
      destination.capabilities = template.capabilities;
      dialog.destination = destination;
      document.body.appendChild(dialog);
      dialog.show();
      Polymer.dom.flush();
      const searchBox = dialog.$.searchBox;
      assertEquals(count == 1, searchBox.hidden);
      const vendorItems = template.capabilities.printer.vendor_capability;
      const items = dialog.shadowRoot.querySelectorAll(
          'print-preview-advanced-settings-item');
      assertEquals(count, items.length);
    }
function testListWithItemCount ( count ) { const template = print_preview_test_utils . getCddTemplateWithAdvancedSettings ( count , printerId , printerName ) ; destination . capabilities = template . capabilities ; dialog . destination = destination ; document . body . appendChild ( dialog ) ; dialog . show ( ) ; Polymer . dom . flush ( ) ; const searchBox = dialog . $ . searchBox ; assertEquals ( count == 1 , searchBox . hidden ) ; const vendorItems = template . capabilities . printer . vendor_capability ; const items = dialog . shadowRoot . querySelectorAll ( 'print-preview-advanced-settings-item' ) ; assertEquals ( count , items . length ) ; }
Verifies that the search box is shown or hidden based on the number
 of capabilities and that the correct number of items are created.
Verifies that the search box is shown or hidden based on the number of capabilities and that the correct number of items are created .
// Search box should be hidden if there is only 1 item. // Verify item is displayed.