Home Manual Reference Source
public class | source

ProfileController

Extends:

* → ProfileController

Controller to perform actions accessible from the My Profile Modal

Constructor Summary

Public Constructor
public

constructor(args: args)

Adds the browser to the controller from the Base Controller constructor.

Member Summary

Public Members
public
public
public
public
public

Method Summary

Public Methods
public

async cancelEditUserName(name: String)

Changes username and cancels.

public

async changeLang(newLang: String): String

Changes language of all text to desired language

public

async changePassword(currentPassword: String, newPassword: String, confirmPassword: String)

Opens page to change password, fills in fields, and updates password.

public

Gets all relevant information from profile

public

async getUsername(): String

Gets username

public

Navigates to my profile using availability dropdown

public

Navigates to my profile using my profile tab on profile modal

public

Navigates to settings page using availability dropdown

public

Navigates to settings using settings tab on profile modal

public

Get extension from change password URL

public

async submitEditUserName(name: String)

Changes username and submits.

Public Constructors

public constructor(args: args) source

Adds the browser to the controller from the Base Controller constructor. This then gets pushed into the various page objects and is ultimately used there to make calls to the actual browser. Creates objects for accessing the Profile Page, Header Panel, and Password Page.

Params:

NameTypeAttributeDescription
args args

Args from client

Public Members

public headerPanel: * source

public passwordPage: * source

public profileModal: * source

public profilePage: * source

public settingsPage: * source

Public Methods

public async cancelEditUserName(name: String) source

Changes username and cancels.

Params:

NameTypeAttributeDescription
name String

New username with changes made

public async changeLang(newLang: String): String source

Changes language of all text to desired language

Params:

NameTypeAttributeDescription
newLang String

Language user desires to change to

Return:

String

Text that reads 'Select your language' in English to test the language has changed

public async changePassword(currentPassword: String, newPassword: String, confirmPassword: String) source

Opens page to change password, fills in fields, and updates password.

Params:

NameTypeAttributeDescription
currentPassword String

Current password for user

newPassword String

Desired new password for user

confirmPassword String

Confirmation of new password for user

public async getProfileDetails(): Object source

Gets all relevant information from profile

Return:

Object

containing profile information

public async getUsername(): String source

Gets username

Return:

String

containing username

public async goToMyProfileViaHeader() source

Navigates to my profile using availability dropdown

public async goToMyProfileViaModal() source

Navigates to my profile using my profile tab on profile modal

public async goToSettingsViaHeader() source

Navigates to settings page using availability dropdown

public async goToSettingsViaModal() source

Navigates to settings using settings tab on profile modal

public async passwordUrlExtension(): String source

Get extension from change password URL

Return:

String

Extension from URL

public async submitEditUserName(name: String) source

Changes username and submits.

Params:

NameTypeAttributeDescription
name String

Desired new username with changes made