Created
February 16, 2016 23:12
-
-
Save firecentaur/1e9ffd0ea8bed484ae83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* Copyright (c) 2016. Movie English Project | |
* All rights reserved | |
* | |
* This file is a Page Object File for the ViewVideo Page | |
* @see https://www.thoughtworks.com/insights/blog/using-page-objects-overcome-protractors-shortcomings for more info | |
******************************************************************************/ | |
'use strict'; | |
//get global vars to use in all specs | |
var globals = require('./../globals.js'); | |
var AngularPage = function () { | |
}; | |
var removeSpaces = function(str) { return str.replace(/\s/g, ''); } | |
AngularPage.prototype = Object.create({}, { | |
tag: { value: function (id) { return element(by.id('tag_' + id)); }}, | |
reallyOk: { get: function () { return element(by.id('reallyOk')); }}, | |
videoTagsSwitch: { get: function () { return element(by.model('video.showIMDBTags')); }}, | |
addTagBtn: { get: function () { return element(by.id("addTagButton")); }}, | |
addTagField: { get: function () { return element(by.id("addTagField")); }}, | |
addTagTypeDropDown: { get: function () { return element(by.model("tagMetaType")); }}, | |
videoTags: { get: function () { return element(by.id("videoTags")); }}, | |
mepLink: { get: function () { return element(by.id('movie_english_group_link')); }}, | |
videoSearchField: { get: function () { return element(by.id('video_search_videoList')).getText(); }}, | |
videoSearchBtn: { get: function () { return element(by.id('getVideos_button_videoList')); }}, | |
videosFound: { value: function (searchQuery) { return element.all(by.id(searchQuery)); }}, | |
videoFound: { value: function (searchQuery) { return element(by.id(searchQuery)); }}, | |
tagInfoSpan: { value: function (name,type) { return element(by.id(name + '_' + type + '_info')); }}, | |
tagInfoDuplicates: { value: function (name,type) { return element.all(by.id(name + '_' + type + '_info')); }}, | |
editTagBtn: { value: function (id) { return element(by.id('editTheTagBtn_' + id)); }}, | |
removeBtn: { value: function (id) { return element(by.id('removeTagBtn_' + id)); }}, | |
tagTypeDropDown: { value: function (id) { return element(by.id('metaType_select_' + id)); }}, | |
updateBtn: { value: function (id) { return element(by.id('updateTagBtn_' + id)); }}, | |
viewVideoPage: { get: function () { return element(by.id('viewVideoPage')); }}, | |
}); | |
module.exports = AngularPage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment