Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change role type to string, and document that it defaults to Administ…
…rator
  • Loading branch information
ockham committed Jun 30, 2021
commit a7e86e053165cb36928519a1f39d590d1e16e6d9
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ _Parameters_
- _object_ `Object?`: Optional Settings for the new user account.
- _object.firstName_ `[string]`: First name.
- _object.lastName_ `[string]`: Last name.
- _object.role_ `[Role]`: Role.
- _object.role_ `[string]`: Role. Defaults to Administrator.

_Returns_

Expand Down
6 changes: 1 addition & 5 deletions packages/e2e-test-utils/src/create-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@ import { switchUserToAdmin } from './switch-user-to-admin';
import { switchUserToTest } from './switch-user-to-test';
import { visitAdminPage } from './visit-admin-page';

/**
* @typedef {'Subscriber' | 'Contributor' | 'Author' | 'Editor' | 'Administrator'} Role
*/

/**
* Create a new user account.
*
* @param {string} username User name.
* @param {Object?} object Optional Settings for the new user account.
* @param {string} [object.firstName] First name.
* @param {string} [object.lastName] Last name.
* @param {Role} [object.role] Role.
* @param {string} [object.role] Role. Defaults to Administrator.
*
* @return {string} Password for the newly created user account
*/
Expand Down