Esempio n. 1
0
    it('Should test if the element is not visible', () => {
        isVisible('#elem2', true);

        _expect(global.browser.isVisible).toHaveBeenCalledTimes(1);
        _expect(global.browser.isVisible)
            .toHaveBeenCalledWith('#elem2');

        _expect(expectToNotEqual).toHaveBeenCalledTimes(1);
        _expect(expectToNotEqual)
            .toHaveBeenCalledWith(
                true,
                'Expected element "#elem2" not to be visible'
            );
    });
Esempio n. 2
0
    it('Should test if the element is visible', () => {
        isVisible('#elem1', false);

        _expect(global.browser.isVisible).toHaveBeenCalled();
        _expect(global.browser.isVisible)
            .toHaveBeenCalledWith('#elem1');

        _expect(expectToEqual).toHaveBeenCalledTimes(1);
        _expect(expectToEqual)
            .toHaveBeenCalledWith(
                true,
                'Expected element "#elem1" to be visible'
            );
    });