<commit_before><!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<!doctype html>
<html>
<head>
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
  <title>mqtt-connection-basic</title>

  <script src="../../webcomponentsjs/webcomponents.min.js"></script>

  <script src="../../web-component-tester/browser.js"></script>

  <!-- Step 1: import the element to test -->
  <link rel="import" href="../mqtt-elements.html">

</head>
<body>

<mqtt-connection></mqtt-connection>

<script>
  //  Setp 2: get the element
  var mqttElement =  document.querySelector('mqtt-connection');

  suite('mqtt-connection-spec', function() {
    //  Setp 3: Test the element
    test('Element is not null', function() {
      assert.isNotNull(mqttElement);
      assert.notTypeOf(mqttElement, 'undefined');
    });

    test('mqtt-connection.clean is boolean', function() {
      assert.isBoolean(mqttElement.clean, 'mqtt-connection.options.clean should be a number greater than 0');
      assert.isTrue(mqttElement.clean);
    });

    test('mqtt-connection.connected is boolean', function() {
      assert.isBoolean(mqttElement.connected, 'mqtt-connection.connected should be a boolean');
      assert.isFalse(mqttElement.connected);
    });

    test('mqtt-connection.disconnecting is boolean', function() {
      assert.isBoolean(mqttElement.disconnecting, 'mqtt-connection.disconnecting should be a boolean');
      assert.isFalse(mqttElement.disconnecting);
    });

    test('mqtt-connection.auto is boolean', function() {
      assert.isBoolean(mqttElement.auto, 'mqtt-connection.auto should be a boolean');
      assert.isTrue(mqttElement.auto);
    });
<commit_msg>adding clientIdPrefix as a proppertie<commit_after><!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<!doctype html>
<html>
<head>
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
  <title>mqtt-connection-basic</title>

  <script src="../../webcomponentsjs/webcomponents.min.js"></script>

  <script src="../../web-component-tester/browser.js"></script>

  <!-- Step 1: import the element to test -->
  <link rel="import" href="../mqtt-elements.html">

</head>
<body>

<mqtt-connection></mqtt-connection>

<script>
  //  Setp 2: get the element
  var mqttElement =  document.querySelector('mqtt-connection');

  suite('mqtt-connection-spec', function() {
    //  Setp 3: Test the element
    test('Element is not null', function() {
      assert.isNotNull(mqttElement);
      assert.notTypeOf(mqttElement, 'undefined');
    });

    test('mqtt-connection.clean is boolean', function() {
      assert.isBoolean(mqttElement.clean, 'mqtt-connection.options.clean should be a number greater than 0');
      assert.isTrue(mqttElement.clean);
    });

    test('mqtt-connection.connected is boolean', function() {
      assert.isBoolean(mqttElement.connected, 'mqtt-connection.connected should be a boolean');
      assert.isFalse(mqttElement.connected);
    });

    test('mqtt-connection.disconnecting is boolean', function() {
      assert.isBoolean(mqttElement.disconnecting, 'mqtt-connection.disconnecting should be a boolean');
      assert.isFalse(mqttElement.disconnecting);
    });

    test('mqtt-connection.auto is boolean', function() {
      assert.isBoolean(mqttElement.auto, 'mqtt-connection.auto should be a boolean');
      assert.isTrue(mqttElement.auto);
    });

    test('mqtt-connection.clientIdPrefix is String', function() {
      assert.typeOf(mqttElement.clientIdPrefix, 'string', 'mqtt-connection.clientIdPrefix should be a String');
      assert.strictEqual(mqttElement.clientIdPrefix, 'mqttjs_', 'On a new instance of <mqtt-connection> the clientIdPrefix should be mqttjs_');
    });

{'fraction_non_alphanumeric': 0.1360645298238166, 'fraction_numerical': 0.005094459774994693, 'mean_word_length': 4.039572192513369, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1982989', 'n_tokens_mistral': 1430, 'n_tokens_neox': 1377, 'n_words': 362}