npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ya-done-appium

v1.1.3

Published

Ready to use yadda - appium - chai framework

Readme

ya-done-appium

Ready to use yadda BBD test framework with appium and chai

In 1.1.1

  • added ability to run with device logging disabled (set deviceLogs: true to switch log back on in device configuration)

In 1.0.1

  • to use async and await ensure you have babel-polyfill
  • added log the this available in steps
  • added global logging availability
  • updated example project and readme
npm i ya-done-appium --save

The aim of this package is to build a simple configuration for 'yadda' to enable QA test engineers to productively build test projects for mobile projects using JavaScript.

ya-done configures 'yadda' with chai with 'appium'. 'yadda' has been created with two context properties. 'appium' can be accessed via the property 'driver' additionally a property of 'ctx', type object, has been added to allow the passing of data between steps.

Technologies Used

Example use

For more information please look at the example project.

package.json script

{
  "scripts": {
    "test": "mocha index.js --require babel-polyfill --compilers js:babel-register inlineAssets=true --timeout 60000"
  }
}

install and run the project

npm i
npm test

sample project structure

│   index.js    
└───steps
│   └───given
│   └───when
│   └───then
└───features
    │ sample.feature

SAMPLE FEATURE

Feature: Sample feature

Scenario: Sample
  Given an element is displayed on the device
  When another element is clicked
  Then a different element is displayed

STEPS LIBRARY

import { yaddaLibrary } from 'ya-done-appium';

const runTests = () => yaddaLibrary()
.given(
  'an element is displayed on the device',
  async function anElementIsDisplayed() {
    const clickableElement = await this.driver.elementById(/*your element id*/);
    this.log('clickableElement', clickableElement);
    await clickableElement.click();
    // assert properly this element is here
    assert.ok(true, this.step);
  }
)
.when(
  'another element is clicked',
  async function anotherElementIsClicked() {
    const clickableElement = await this.driver.elementById(/*your element id*/);
    this.log('clickableElement', clickableElement);
    await clickableElement.click();
    assert.ok(true, this.step);
  }
)
.then(
  'a different element is displayed',
  async function anotherElementIsDisplayed() {
    await this.driver.sleep(3000);
    const logout = await this.driver.elementById(/*your element id*/);
    this.log('clickableElement', clickableElement);
    // assert properly this element is here
    assert.ok(true, this.step);
  }
);
export default runTests();

index.js (project level)

EXAMPLE DEVICE CONFIGS

local ios configuration

import { yaddaCore } from 'ya-done-appium';
import steps from './steps';

// device to test on
const localIos = {
  platformName: 'iOs',
  platformVersion: '11.0',
  deviceName: 'iPhone 7 Plus',
  app: // Add local ios ipa here
  deviceLogs: true // This will print out the device configuration after booting device
};

// no server is required for local (exclude or 'undefined' for localhost)
const server = undefined;

// enable verbose logging in the console (this is not required)
const verboseLogging = true;

yaddaCore(steps, localIos, server, verboseLogging);

local android configuration

import { yaddaCore } from 'ya-done-appium';
import steps from './steps';

// device to test on
const localAndroid = {
  platformName: 'Android',
  platformVersion: '7.0',
  deviceName: 'device',
  app:  // Add local Android APK path here
  deviceLogs: true // This will print out the device configuration after booting device
};

// no server is required for local (exclude or 'undefined' for localhost)
const server = undefined;

// enable verbose logging in the console (this is not required)
const verboseLogging = true;

yaddaCore(steps, localAndroid, server, verboseLogging);

saucelabs ios configuration

import { yaddaCore } from 'ya-done-appium';
import steps from './steps';

// device to test on
const remoteIos = {
  platformName: 'iOs',
  platformVersion: '11.0',
  deviceName: 'iPhone 7 Plus',
  app: `sauce-storage:${your-ipa}`,
  deviceLogs: true // This will print out the device configuration after booting device
};

// enable verbose logging in the console
const verboseLogging = true;

// server config saucelabs as example
const server = {
  host: 'ondemand.saucelabs.com',
  port: 80,
  auth: `${SAUCELABS_USER}:${SAUCELABS_AUTH}`,
};

yaddaCore(steps, remoteIos, server, verboseLogging);

saucelabs android configuration

import { yaddaCore } from 'ya-done-appium';
import steps from './steps';

// device to test on
const remoteAndroid = {
  'appium-version': '1.6.5',
  platformName: 'Android',
  platformVersion: '6.0',
  deviceName: 'Android Emulator',
  app: `sauce-storage:${your-apk}`,
  deviceLogs: true // This will print out the device configuration after booting device
};

// enable verbose logging in the console
const verboseLogging = true;

// server config saucelabs as example
const server = {
  host: 'ondemand.saucelabs.com',
  port: 80,
  auth: `${SAUCELABS_USER}:${SAUCELABS_AUTH}`,
};

yaddaCore(steps, remoteAndroid, server, verboseLogging);