atk_commands.js

Function
Description
createUserWithUserObject(user, roles, args, options)
Create user given user object using Drush. Object is in JSON.
deleteCurrentNodeViaUi(page)
Delete currently opened node.
deleteNodeViaUiWithNid(nid)
Delete node via UI given a nid.
deleteNodeWithNid(nid)
Delete node via drush with a given nid.
deleteUserWithEmail(email, options)
Delete user via Drush given an account email.
deleteUserWithUid(uid, options)
Delete user via Drush given a Drupal UID.
deleteUserWithUserName(userName, args, options)
Delete user via Drush given a Drupal username.
execDrush(cmd,args, options, failOnNonZeroExit)
Run drush command locally or remotely depending on the environment.
execPantheonDrush(cmd)
Run a Pantheon Drush command via Terminus.
expectMessage(text)
Assert presence of a message with given text on the page.
getDrushAlias()
Returns Drush alias per environment (in native OS, in native OS+container or in container).
getUidWithEmail(email)
Return the UID of a user given an email.
getUsernameWithEmail(email)
Return the Username of a user given an email.
inputTextIntoCKEditor(text, instanceNumber)
Inputs text into a specific CKEditor instance on a Playwright-controlled page.
logInViaForm(page, context, account)
Given an account (username, password), log in using the form located at loginUrl.
logInViaUli(page, context, uid)
Log in with user:login given a user id.
logOutViaUi(page, context)
Log out by visiting the url at logoutUrl.
setDrupalConfiguration(objectName, key, value)
Set Drupal configuration via Drush (cset).

 

atk_utilities.js

Function
Description
createRandomString(length)
Return string of characters from A-Za-z0-9.
createRandomUser()
Return a user object with random name, email, and password.
readYAML(filename)
Read data from a YAML file located in tests/data.