How to use the @hetznercloud/protractor-test-helper.waitForTextToBe function in @hetznercloud/protractor-test-helper

To help you get started, we’ve selected a few @hetznercloud/protractor-test-helper 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 hetznercloud / protractor-test-helper / test / flow / waits.e2e-spec.ts View on Github external
it('waitForText should wait for an element to contain a text', () => {
        waitForTextToBe(waitsPage.waitForText, 'match');

        expect(waitsPage.waitForText.getText()).toBe('match');
    });
github hetznercloud / protractor-test-helper / test / async / actions.e2e-spec.ts View on Github external
it('selectOptionByIndex should select an option', async () => {
        const option = 'option2';
        await selectOptionByIndex(actionsPage.select, 1);
        await waitForTextToBe(actionsPage.selectResult, option);
        await expect(getText(actionsPage.selectResult)).toBe(option);
    });
github hetznercloud / protractor-test-helper / test / flow / actions.e2e-spec.ts View on Github external
it('sendKeys should send keys to input the button', () => {
        const text = 'keys to send';
        sendKeys(actionsPage.sendKeysInput, text);
        waitForTextToBe(actionsPage.inputResult, text);

        expect(getText(actionsPage.inputResult)).toBe(text);
    });
github hetznercloud / protractor-test-helper / test / async / waits.e2e-spec.ts View on Github external
it('waitForTextToBe should wait for an element to contain a text', async () => {
        await waitForTextToBe(waitsPage.waitForText, 'match');

        await expect(waitsPage.waitForText.getText()).toBe('match');
    });
github hetznercloud / protractor-test-helper / test / async / actions.e2e-spec.ts View on Github external
it('sendKeys should send keys to input the button', async () => {
        const text = 'keys to send';
        await sendKeys(actionsPage.sendKeysInput, text);
        await waitForTextToBe(actionsPage.inputResult, text);

        await expect(getText(actionsPage.inputResult)).toBe(text);
    });
github hetznercloud / protractor-test-helper / test / flow / actions.e2e-spec.ts View on Github external
it('selectOption should select an option', () => {
        const option = 'option2';
        selectOption(
            actionsPage.select.element(
                by.cssContainingText(actionsPage.optionSelector, option)
            )
        );
        waitForTextToBe(actionsPage.selectResult, option);
        expect(getText(actionsPage.selectResult)).toBe(option);
    });
github hetznercloud / protractor-test-helper / test / simple-js / readmeexample.e2e-spec.js View on Github external
it('should add one and two', () => {
        sendKeys(firstNumber, '1');
        sendKeys(secondNumber, '2');
        click(goButton);

        waitForTextToBe(latestResult, '3');
        expect(getText(latestResult), '3');
    });
});

@hetznercloud/protractor-test-helper

[![npm version](https://badge.fury.io/js/%40hetznercloud%2Fprotractor-test-helper.svg)](https://www.npmjs.com/package/@hetznercloud/protractor-test-helper) [![Build Status](https://travis-ci.com/hetznercloud/protractor-test-helper.svg?branch=master)](http

MIT
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis