Symbiote\TestAssist\SilverstripeFunctional
Synopsis
class SilverstripeFunctional
extends Module
{
- // members
- public $I;
- protected string $saveButton = 'action_doSave';
- // methods
- public void __construct()
- public void getModuleReference()
- public void haveLoginDetailsFor()
- public void loginToPage()
- public void loginToAdminAs()
- public void canVerify()
- public void canVerifyInDOM()
- public void clickCMSMenuItemFor()
- public void getElements()
- public void amOnHome()
- public void amAtHome()
- public void loginToAdmin()
- public void loginWith()
- public void logout()
- public void waitForJQuery()
- public void waitForAjax()
- public void waitForElement()
- public void waitForElementToDisappear()
- public bool waitForElementToAppear()
- public void sleep()
- public void clickChosenDropdown()
- public void waitForChosenDropdown()
- public void doUntilNoMore()
- public void openModelAdmin()
- public void clickModelAdminTab()
- public void clickModelAdminRootTab()
- public void clickModelAdminAddButton()
- public void clickModelAdminSaveButton()
- public void clickModelAdminCreateButton()
- public void clickModelAdminDeleteButton()
- public void clickModelAdminPublishButton()
- public void upload()
- public void createPageHierarchy()
- public void createPage()
- public void populatePage()
- public void openPageInSiteTree()
Hierarchy
Extends
- Codeception\Module
Members
protected
- $saveButton
—
string
These can be set depending on better buttons or not
public
- $I
Methods
public
- __construct()
- amAtHome() — Alias method for nice readability
- amOnHome() — Alias method for nice readability
- canVerify()
- canVerifyInDOM()
- clickCMSMenuItemFor()
- clickChosenDropdown() — Click the given option from the chosen dropdown. The index starts at 0, so the 10th element in the list would be element number 9. The first element would be element number 0.
- clickModelAdminAddButton()
- clickModelAdminCreateButton()
- clickModelAdminDeleteButton()
- clickModelAdminPublishButton()
- clickModelAdminRootTab()
- clickModelAdminSaveButton()
- clickModelAdminTab()
- createPage()
- createPageHierarchy() — Creates the given hierarchy, skipping pages that already exist.
- doUntilNoMore() — Repeatedly perform some function until the given selector doesn't exist in the page any more
- getElements()
- getModuleReference()
- haveLoginDetailsFor()
- loginToAdmin() — Wrapper method to navigate to /admin and login.
- loginToAdminAs()
- loginToPage()
- loginWith() — Performs a log in. By defafult it will look for specific fields with attributes name=Email and name=Password.
- logout()
- openModelAdmin()
- openPageInSiteTree() — Opens a page in the site tree. Takes either a string for a top level page, or an array of pages to expand.
- populatePage()
- sleep() — Halt executing thread for a specified quantity of seconds
- upload()
- waitForAjax() — Waits for jQuery to not be active. This is done when data is being retrieved or posted via
- waitForChosenDropdown() — Waits for the chosen dropdown to appear
- waitForElement() — Wait for an element to be rendered in the DOM. Can be used in tandem with @method waitForElementToAppear
- waitForElementToAppear() — Waits for an element to appear. Will return a boolean value depending on whether or not the element is visible, in order for the developer to handle situations accordingly.
- waitForElementToDisappear() — Waits for an element to disappear. Will return a boolean value dpeending on whether or not the element is no longer visible in the browser so the developer can handle situations accordingly.
- waitForJQuery() — Waits for jQuery to load. This prevents certain calls being invalid due to jQuery being undefined.