How to use astrolabe - 10 common examples

To help you get started, we’ve selected a few astrolabe 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 rackerlabs / encore-ui / utils / demo.page.js View on Github external
var Page = require('astrolabe').Page;
var URL = require('../node_modules/astrolabe/lib/astrolabe/utils/url'); // http://i.imgur.com/iCWOGrq.gif
var _ = require('lodash');

module.exports = Page.create({

    /**
     * @override
     * @description I needed this to *always* go to the designated component demo page
     * while using a `debug=true` flag. This exposes all facets of a demo component page,
     * which is required to reach full test coverage. For normal users, they shouldn't have
     * to see all eight or ten examples of a component -- one or two is sufficient. However, this
     * function over ride keeps all typical `.go` functionality intact from the latest release.
     * See the source for a link to the exact commit SHA that I borrowed the `.go` functionality from.
     */
    go: {
        value: function () {
            var url = new URL('');

            // stuplum/astrolabe/blob/963eb5001d7d3ce019a6ed66cec62ba2bb0d316b/lib/astrolabe/page.js#L10-L13
            _.each(arguments, function (arg) {
github rackerlabs / encore-ui / src / rxForm / docs / rxForm.midway.js View on Github external
var _ = require('lodash');
var Page = require('astrolabe').Page;

// an anonymous page object to prove that form filling works
var formPageObject = Page.create({
    form: {
        set: function (formData) {
            encore.rxForm.form.fill(this, formData);
        }
    },

    plainTextbox: encore.rxForm.textField.generateAccessor($('#txtPlain')),

    requireName: encore.rxForm.checkbox.generateAccessor($('#chkVolumeNameRequired')),

    options: {
        get: function () {
            return Page.create({
                first: encore.rxForm.radioButton.generateAccessor($('#favBeatle_0')),
                second: encore.rxForm.radioButton.generateAccessor($('#favBeatle_1'))
            });
github rackerlabs / encore-ui / src / components / rxForm / docs / rxForm.midway.js View on Github external
var Page = require('astrolabe').Page;

// an anonymous page object to prove that form filling works
var formPageObject = Page.create({
    form: {
        set: function (formData) {
            encore.rxForm.fill(this, formData);
        }
    },

    plainTextbox: encore.rxForm.textField.generateAccessor($('#txtPlain')),

    requireName: encore.rxCheckbox.generateAccessor($('#chkVolumeNameRequired')),

    options: {
        get: function () {
            return Page.create({
                first: encore.rxRadio.generateAccessor($('#favBeatle_0')),
                second: encore.rxRadio.generateAccessor($('#favBeatle_1'))
            });
github rackerlabs / encore-ui / src / rxStatusColumn / docs / rxStatusColumn.midway.js View on Github external
var _ = require('lodash');
var Page = require('astrolabe').Page;

var rxStatusColumn = encore.rxStatusColumn;
var rxSortableColumn = encore.rxSortableColumn;

// an anonymous page object to demonstrate table and cell creation
var repeaterString = 'server in servers';
var tablePageObject = Page.create({

    rootElement: {
        get: function () {
            return $('.demo-status-column-table');
        }
    },

    tblServers: {
        get: function () {
            return this.rootElement.all(by.repeater(repeaterString));
        }
    },

    column: {
        value: function (columnName) {
            // Only 'Status' is supported -- 'Title' is unsortable.
github Droogans / ProtractorPageObjects / test / pages / base.js View on Github external
var Page = require('astrolabe').Page;

module.exports = Page.create({
    url: { value: '/home' }
});
github Droogans / ProtractorPageObjects / test / pages / login.js View on Github external
var Page = require('astrolabe').Page;

module.exports = Page.create({
    url: { value: '/login' }
});
github PaulL1 / league-tutorial-rails4 / src / app / club / clubs.part.scenario.js View on Github external
/**
 * Partial for the page objects associated with clubs
 */
var Page = require('astrolabe').Page;

module.exports = Page.create({
  url: { value: 'UI/index.html#/clubs' },
  title: { get: function() { return this.findElement(this.by.id('title')); } },
  description: { get: function() { return this.findElement(this.by.id('description')); } },
  clubTableElement: { value: function(rowNum, columnBinding) { 
    return this.findElement(this.by.repeater('row in renderedRows').row(rowNum).column(columnBinding)); } }
  }
);
github PaulL1 / league-tutorial-rails4 / src / app / home / home.part.scenario.js View on Github external
/**
 * Partial for the page objects associated with home
 */
var Page = require('astrolabe').Page;

module.exports = Page.create({
  url: { value: 'UI/index.html' },
  clubsLink: { get: function() { return this.findElement(this.by.id('clubsLink')); } }, 
  teamsLink: { get: function() { return this.findElement(this.by.id('teamsLink')); } }  
});
github rackerlabs / encore-ui / utils / rx-page-objects / src / rxCollapse.page.js View on Github external
initialize: function (rxCollapseElement) {
        if (rxCollapseElement === undefined) {
            rxCollapseElement = $('rx-collapse');
        }

        rxCollapse.rootElement = {
            get: function () { return rxCollapseElement; }
        };
        return Page.create(rxCollapse);
    },
github rackerlabs / encore-ui / utils / rx-page-objects / src / rxCharacterCount.page.js View on Github external
initialize: function (rxCharacterCountElement) {
        rxCharacterCount.rootElement = {
            get: function () { return rxCharacterCountElement; }
        };
        return Page.create(rxCharacterCount);
    },

astrolabe

Page objects for protractor

Unrecognized
Latest version published 9 years ago

Package Health Score

39 / 100
Full package analysis

Popular astrolabe functions