How to use the @webex/test-helper-test-users.create function in @webex/test-helper-test-users

To help you get started, we’ve selected a few @webex/test-helper-test-users examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webex / react-widgets / test / journeys / lib / test-users.js View on Github external
function createUsers() {
    const promises = [];
    const createdUsers = [];

    for (let i = 0; i < count; i += 1) {
      const userConfig = config ? config[i] : {};

      promises.push(testUsers.create({count: 1, config: userConfig}).then((usersArray) => {
        createdUsers.push(usersArray[0]);
      }));
    }

    return Promise.all(promises)
      .then(() => storeUsers(createdUsers))
      // Adding delay for test user creation propagation
      .then(() => new Promise((resolve) => {
        setTimeout(resolve, 3000);
      }));
  }
github webex / react-widgets / test / journeys / specs / tap / widget-space / space.js View on Github external
  before('create lorraine', () => testUsers.create({count: 1, config: {displayName: 'Lorraine Baines'}})
    .then((users) => {
      [lorraine] = users;
      lorraine.spark = new CiscoSpark({
        credentials: {
          authorization: lorraine.token,
          federation: true
        },
        config: {
          logger: {
            level: 'error'
          }
        }
      });

      return lorraine.spark.internal.mercury.connect();
    }));
github webex / react-widgets / test / journeys / specs / tap / widget-recents / index.js View on Github external
  before('create marty', () => testUsers.create({count: 1, config: {displayName: 'Marty McFly'}})
    .then((users) => {
      [marty] = users;
      marty.spark = new CiscoSpark({
        credentials: {
          authorization: marty.token,
          federation: true
        },
        config: {
          logger: {
            level: 'error'
          }
        }
      });

      return marty.spark.internal.mercury.connect();
    }));

@webex/test-helper-test-users

MIT
Latest version published 19 days ago

Package Health Score

81 / 100
Full package analysis

Popular @webex/test-helper-test-users functions

Similar packages