Link Search Menu Expand Document

Cypress Command: performAllLabActions

Summary

cy.performAllLabActions() - Test the entire lab by performing the actions specified by the instructions

Parameters

none

Example

it("performs all lab actions", () => {
  cy.performAllLabActions();
});

Waiting

This command will wait until the lab environment is started and all lab actions are performed across all steps in the lab, including:

  • Clicking on executable code blocks
  • Click on copy-to-editor blocks
  • Checking links to URLs within the lab environment

Verification

This command will verify that all actions on all steps have been performed.

If your lab is not entirely instruction-guided because it contains steps that a human learner would perform outside the lab, such as interacting with the AWS web console, you may need to replace those steps with lower-level Cypress commands to complete an equivalent task.

Instead of calling performAllLabActions to complete the entire lab, you may substitute the interaction with the AWS web console with a call to terminalType to run shell commands that invoke the aws CLI.

You may still perform the remaining steps and actions of the lab using instruction-guided commands, such as:

Be sure to call startScenario to initialize the lab.

A human learner will be most successful if the lab can be written so that all actions the learner must take are specified within the instructions.

Instruction-Guided

This is an entirely instruction-guided command: By using this command to ask Cypress to click through all the steps of the lab, you will avoid having to update your tests as the lab instructions change.