# protractor-mock-helper

> Another protractor http backend mock helper. It uses similar aproach to http-backend-proxy and protractor-http-mock.

Latest version **0.0.4** (published 2015-12-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install protractor-mock-helper
pnpm add protractor-mock-helper
yarn add protractor-mock-helper
bun add protractor-mock-helper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2015-12-17 |
| First published | 2015-12-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | okhomenko |

## Links

- npm: https://www.npmjs.com/package/protractor-mock-helper
- npm.io page: https://npm.io/package/protractor-mock-helper

## Recent versions

- 0.0.4 (latest) — 2015-12-17
- 0.0.3 — 2015-12-17
- 0.0.2 — 2015-12-17

## README

# protractor-mock-helper

Another protractor http backend mock helper. It uses similar aproach to http-backend-proxy and protractor-http-mock.

## Install

```bash

npm install --save-dev protractor-mock-helper

```


## Usage

```javascript

var mocks = require('protractor-mock-helper');

describe('Example Test Suite', function () {

  it('should test', function () {
    browser.addMockModule('httpBackEndMock', mocks.build([
      function ($httpBackend) {
        return $httpBackend.whenPOST(/api\/auth$/).respond(200);
      }
    ]));

    browser.get('/');
    element(by.css('[name="username"]')).sendKeys('admin');
    element(by.css('[name="password"]')).sendKeys('password');
    element(by.buttonText('OK')).click();

    expect(element(by.css('.messages')).getText()).toMatch('Successfully');
  });

});

```

LICENSE: MIT

---
_Source: https://npm.io/package/protractor-mock-helper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
