OpenVeo test API

API Docs for: 8.0.0
Show:

Page

Module: e2e

Summary

Defines a web page to help writing end to end tests with protractor for OpenVeo.

Do not use this directly but extend it.

Constructor

Page

Syntax

Page

()

Summary

Example:

var Page = require('@openveo/test').e2e.pages.Page;

function MyPage() {
  MyPage.super_.call(this);
  this.path = 'be/myPage';
}

module.exports = MyPage;
util.inherits(MyPage, Page);

var page = new MyPage();
page.load().then(function() {
  console.log('Page fully loaded');
});

Methods

deleteCookies

Syntax

deleteCookies

() Promise

Summary

Removes all cookies on the actual page.

Returns:

Promise:

Promise resolving when all cookies are deleted

getPath

Syntax

getPath

() Promise

Summary

Helper Url Get only current url path without host

Returns:

Promise:

Promise resolving with current path

getTitle

Syntax

getTitle

() Promise

Summary

Gets page title as described by the HTMLTitleElement.

Returns:

Promise:

Promise resolving with the title of the page

Example:

// With MyPage extending Page
var page = new MyPage();
assert.eventually.equal(page.getTitle(), 'My page title');

load

Syntax

load

() Promise

Summary

Loads the page.

Returns:

Promise:

Promise resolving when the page is fully loaded

Example:

var Page = require('@openveo/test').e2e.pages.Page;

function MyPage() {
  MyPage.super_.call(this);
  this.path = 'be/myPage';
}

module.exports = MyPage;
util.inherits(MyPage, Page);

var page = new MyPage();
page.load().then(function() {
  console.log('Page fully loaded');
});

onLoaded

Syntax

onLoaded

() Promise

Summary

Handles page loaded.

Use this method to perform actions after the page is loaded. Typically, verify that the page is loaded by waiting for elements to be present on the page.

By default it does nothing, override it to define your own behaviour.

Returns:

Promise:

Promise resolving when the page is fully loaded

refresh

Syntax

refresh

() Promise

Summary

Refreshes actual page.

Returns:

Promise:

Promise resolving when the page is fully loaded

Properties

bodyElement

Syntax

bodyElement

ElementFinder final

Summary

Body element.

EC

Syntax

EC

ExpectedConditions final

Summary

Protractor expected conditions.

flow

Syntax

flow

ControlFlow final

Summary

Protractor control flow.

pageElement

Syntax

pageElement

ElementFinder final

Summary

Page element.

Page wrapper holding the content scrollbar.