TakeNotes <Notes_Type>
Hierarchy
- Ability
- TakeNotes
Index
Methods
staticusingAnEmptyNotepad
Initialises an Ability to TakeNotes with Notepad.empty.
Type parameters
- N: Record<any, any>
Returns TakeNotes<N>
staticusing
Initialises an Ability to TakeNotes using a Notepad.with some initial state.
Type parameters
- N: Record<any, any>
Parameters
notepad: Notepad<N>
Returns TakeNotes<N>
An Ability that enables an Actor to remember information to be recalled during a test scenario.
Under the hood, TakeNotes uses a Notepad, which state can be populated both during initialisation or while the test scenario is executed. Populating the notepad when itβs initialised can be useful to associate authentication credentials or personal details with a given actor, while dynamic recording of notes during a test scenario can be useful when the data to be recorded is not known upfront - for example when we want the actor to remember a JWT stored in the browser and then use it when sending API requests.
Pro tip: TakeNotes, Notepad and notes can be typed using TypeScript generics to help you avoid typos when specifying note names.
See notes and Notepad for more usage examples.
Remembering and retrieving a value
Using generics
Populating the notepad with initial state
Recording a dynamic note
Clearing a notepad before each test scenario (Mocha)
Clearing a notepad before each test scenario (Cucumber)
Importing notes from an API response
Using the QuestionAdapter
Learn more