Protractor rules for Bazel

The Protractor rules run tests under the Protractor framework with Bazel.

Installation

Add the @bazel/protractor npm package to your devDependencies in package.json.

Macros and Functions

protractor_web_test

Runs a protractor test in a browser.

Example usage (generated)

load("@npm//@bazel/protractor:index.bzl", "protractor_web_test")

protractor_web_test(
    # The name of the test
    name = "",
)

name

The name of the test

configuration

Protractor configuration file.

on_prepare

A file with a node.js script to run once before all tests run. If the script exports a function which returns a promise, protractor will wait for the promise to resolve before beginning tests.

srcs

JavaScript source files

deps

Other targets which produce JavaScript such as ts_library

data

Runtime dependencies

server

Optional server executable target

tags

Standard Bazel tags, this macro adds one for ibazel

peer_deps

List of peer npm deps required by protractor_web_test

protractor_entry_point

A label providing the protractor entry point Default to :node_modules/protractor/bin/protractor.

kwargs

passed through to protractor_web_test


protractor_web_test_suite

Defines a test_suite of web_test targets that wrap a protractor_web_test target.

Example usage (generated)

load("@npm//@bazel/protractor:index.bzl", "protractor_web_test_suite")

protractor_web_test_suite(
    # The base name of the test
    name = "",
)

name

The base name of the test

browsers

A sequence of labels specifying the browsers to use.

web_test_data

Data dependencies for the wrapper web_test targets.

wrapped_test_tags

A list of test tag strings to use for the wrapped karma_web_test target.

kwargs

Arguments for the wrapped karma_web_test target.