How to use the wd.asserters function in wd

To help you get started, we’ve selected a few wd 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 newsuk / times-components / fructose / setup.android.js View on Github external
/* globals beforeAll afterAll jasmine */
import fructose from "@times-components/fructose/setup";
import path from "path";
import wd from "wd";

global.asserter = wd.asserters;
const driver = wd.promiseChainRemote({ host: "localhost", port: 4723 });

beforeAll(async () => {
  await fructose.hooks.mobile.setup();

  const options = {
    desiredCapabilities: {
      browserName: "",
      platformName: "Android",
      platformVersion: "5.1",
      deviceName: "Nexus_5X_API_22",
      app: path.join(
        __dirname,
        "../android/app/build/outputs/apk/release/app-release.apk"
      )
    },
github ustwo / ustwo.com-frontend / test / integration / sanity.js View on Github external
it('should go to the Blog page and look for Featured post', () => {
    return browser
      .get(blogURL)
      .waitForElementByCss(featuredBlogPost, wd.asserters.textInclude(blogReadmore), 15000)
      .url().should.eventually.include(blogSlug);
  });
github wikipathways / pvjs / test / e2e / wikipathways.org.js View on Github external
it("should go to the browse page", function(done) {
            browser
                .elementByCss('#n-Browse > a')
                .click()
                .waitForElementByCss("#pageTitle", wd.asserters.textInclude('Browse pathways'), 10000)
                .title()
                .should.eventually.include("Browse pathways")
                .nodeify(done);
        });
github wikipathways / pvjs / test / e2e / wikipathways.org.js View on Github external
it("should get the WP1 widget page on the production site", function(done) {
        browser
            .get("http://www.wikipathways.org/wpi/PathwayWidget.php?id=WP1")
            .title()
            .should.become("WikiPathways Pathway Viewer")
            .waitForElementById("pathwayImage", wd.asserters.isDisplayed, 20000)
            .saveScreenshot('tmp/WP1-' + desired.browserName + '-production.png')
            .nodeify(done);
    });
github wikipathways / pvjs / test / e2e / deprecated-but-newer / sauce.js View on Github external
it("should get data-nodes test page", function(done) {
        browser
            .get("http://pointer.ucsf.edu/d3/r/pathvisiojs/test/one-diagram.html?gpml=http://pointer.ucsf.edu/d3/r/pathvisiojs/test/data/protocol/gpml-data-nodes.gpml.xml")
            .title()
            .should.become("Pathvisiojs Simple Built Production Example")
            .waitForElementById("pvjs-diagram-1", wd.asserters.isDisplayed, 20000)
            .saveScreenshot('tmp/data-nodes-' + desired.browserName + '-test.png')
            .nodeify(done);
    });
github jakepusateri / auto-babel / test / sauce / es-feature-specs.js View on Github external
it("should run the tests", function(done) {
        browser
	    .get("http://127.0.0.1:9999/SpecRunner.html")
	    .waitForElementById('out', wd.asserters.textInclude('everything'), 10000, function (err, el) {
		el.text(function (err, text) {
		    fs.writeFileSync('./build/results/' + desired.blVersion + '.json', (text));
		})
	    })
	    .nodeify(done);
    });
});
github theonion / videojs-vast-plugin / spec / sauce-wd.js View on Github external
it("should go to the doc page (" + i + ")", function(done) {
      browser
        .elementById('docsbutton')
        .click()
        .waitForElementByCss("#content header", wd.asserters.textInclude('Manual'), 10000)
        .title()
        .should.eventually.include("Manual")
        .nodeify(done);
      });
github axemclion / browser-perf / lib / probes / ChromeTracingProbe.js View on Github external
}).then(function() {
		return browser.waitFor({
			asserter: wd.asserters.jsCondition('(typeof window.__tracingData !== "undefined")', false),
			timeout: 1000 * 60 * 3,
			pollFreq: 1000
		});
	}).then(function() {
		return browser.eval('window.__tracingData.results');
github axemclion / browser-perf / lib / probes / NavTimingProbe.js View on Github external
return browser.execute(helpers.fnCall(code)).then(function() {
		return browser.waitFor({
			asserter: wd.asserters.jsCondition('(typeof window.__navTimings !== "undefined")', false),
			timeout: 1000 * 60 * 10,
			pollFreq: 1000
		});
	}).then(function(res) {
		return browser.eval('window.__navTimings');
github axemclion / browser-perf / lib / actions / scrollAction.js View on Github external
})).then(function() {
			debug('Waiting for Scrolling to finish');
			return browser.waitFor({
				asserter: wd.asserters.jsCondition('(window.__scrollActionDone === true)', false),
				timeout: 1000 * 60 * 10,
				pollFreq: cfg.pollFreq || 2000
			});
		})
	};