Tests

We use Codeception for testing, especially testing the php code.

Useful commands and common pitfalls

Useful commands for testing and common pitfalls.

CommandActionPitfall
amOnPageChanges URL, loads page, waits for body visibleDo not use to assert being on a URL
amOnSubdomainChanges internal URL stateDoes not load a page
amOnUrlChanges internal URL stateDoes not load a page
clickFires JavaScript click eventDoes not wait for anything to happen afterwards
seeCurrentUrlEqualsChecks on which URL the browser is (e.g. after a redirect)
submitFormFills form details and submits it via click on the submit buttonDoes not wait for anything to happen afterwards
waitForElementWaits until a specific element is available in the DOM
waitForPageBodyWaits until the page body is visible (e.g. after click is expected to load a new page)