testRigor & Salesforce
  • NO-CODE UI TESTING: Guide for testRigor & Salesforce
  • Getting Started
    • Get a Salesforce Hands-On Playground Org (free)
    • Get testRigor (free) and create a Test Suite
    • Create Test Case (T00001)
    • Navigation in Salesforce
    • Navigation in testRigor
  • BASIC TEST CASES
    • Record, edit and play a Test Case (T00002)
    • Create and convert a Lead (T00003)
    • Create more records (T00004)
    • Check Account Validation Rule (T00005)
  • ADVANCED TEST CASES
    • Account Action and List View Button (T00006)
    • Validate Field Value Using REST API (T00007)
    • E2E: Lead entry (Titan) ➔ Salesforce ➔ Email
  • OTHER TEST SCENARIOS
    • Submit a Test Lead
    • TH: Opportunity Won THEN Create Contract
    • Monitor data in your website
    • Monitoring in Production
  • FLOW TEST CASES
    • Screen Flow: Update Email Address
  • E-BIKES SAMPLE APP
    • E-Bikes sample app description
    • testRigor version of the UTAM TEST (EBIKES-00001)
    • Product Explorer - Electra X3 (EBIKES-00002)
    • Reseller Order - Create (EBIKES-00003)
    • Case - Create (EBIKES-00004)
  • LWC RECIPES SAMPLE APP
    • LWC Recipes sample app description
    • Test Case for LWC Recipes (LWC-00001)
  • CORAL CLOUDS SAMPLE APP
    • Coral Clouds sample app description
    • Experience - Generate Description using AI (CC-00001)
    • Experience - Generate Reviews Summary using AI (CC-00002)
  • MORE INFORMATION
    • About testing
    • About testing in Salesforce 🤔
    • About test automation
    • About Test-Driven Development (TDD)
    • About testRigor
    • About using testRigor
    • About other solutions
  • FEEDBACK
    • Questions? - Comments!
Powered by GitBook
On this page
  1. LWC RECIPES SAMPLE APP

Test Case for LWC Recipes (LWC-00001)

PreviousLWC Recipes sample app descriptionNextCoral Clouds sample app description

Last updated 5 months ago

Test Case

  • the test case is a bit long

    • therefore, I hide it in the TEST CASE-tab

  • instructions of special interest are highlighted with // <=============

login

// check that page contains "STOP STOP" and stop test if fails

// HELLO
open url "https://ebikes-dev-ed.develop.lightning.force.com/lightning/n/Hello"

check that page contains "HelloBinding"
enter "Elvis" into "Name"
check that page contains "Hello, Elvis!"

check that page contains "HelloExpressions"
enter "Pierre" into "First Name"
enter "Bourdieu" into "Last Name"
check that page contains "Uppercased Full Name: PIERRE BOURDIEU"

check that page contains "HelloConditionalRendering"
check that page doesn't contain "These are the details!"
enter "1" into "Show details"
check that page contains "These are the details!"

// CHILD-TO-PARENT
open url "https://ebikes-dev-ed.develop.lightning.force.com/lightning/n/Events"

check that page contains "EventSimple"
check that page contains "Page 1"
click "Next" 13 times
check that page contains "Page 14"

// PARENT-TO-CHILD
open url "https://ebikes-dev-ed.develop.lightning.force.com/lightning/n/Parent_to_Child"
check that page contains "ApiSetterGetter"
enter "Buy milk" into "Description"
enter "1" into "Priority"
click "Add Todo"
check that page contains "Buy milk" below "Install Ebikes sample app"

// WIRE
open url "https://ebikes-dev-ed.develop.lightning.force.com/lightning/n/Wire"
wait 5 seconds
click "Close this window" // clears the "Component Error"
click "Close this window" // clears the "Component Error"

check that page contains "WireGetObjectInfo"
enter "Contact" into "Search"
click "Get Object Info"
check that page contains "\"apiName\": \"Contact\""  // <============ escape characters with a backslash

check that page contains "WireGetPicklistValues"
check that checkbox "Prospect" is not checked
check that checkbox "Technology Partner" is not checked
enter "1" into "Prospect"
enter "1" into "Technology Partner"
check that checkbox "Prospect" is checked
check that checkbox "Technology Partner" is checked

check that page contains "WireGetPicklistValuesByRecordType"
click "slds-button slds-button_icon slds-m-right_x-small" to the left of "Industry"  // <===== sometimes you need to "Inspect" and find the name of the element
check that page contains "Utilities" roughly below "Account Picklists"

// RECORD PICKER
open url "https://ebikes-dev-ed.develop.lightning.force.com/lightning/n/Record_Picker"

check that page contains "RecordPickerHello"
enter "green" into "Select a record" below "RecordPickerHello"
click "Avi" below "RecordPickerHello"
check that page contains "Avi Green"
check that page contains "(212) 842-5500"

check that page contains "RecordPickerDynamicTarget"
click "Account" below the "RecordPickerDynamicTarget"
click "Contact" below the "RecordPickerDynamicTarget"
enter "Bond" into "Search..." below the "RecordPickerDynamicTarget"
click "John Bond"

check that page contains "RecordPickerMultiValue"
enter "avi" into "Contacts"
click "Josh Davis"
enter "baba" into "Contacts"
click "Babara Levy"
check that page contains "Josh Davis"
check that page contains "Babara Levy"


// MISC
open url "https://ebikes-dev-ed.develop.lightning.force.com/lightning/n/Misc_Techniques"

// TOAST NOTIFICATIONS DO NOT SHOW UP IN testRigor?
// check that page contains "MiscToastNotification"
// enter "Error Title" into "Title"
// enter "Error Message" into "Message"
// select "error" in "Variant"
// click "Show Toast Notification"
// check that page contains "Error Title" 

check that page contains "MiscModal"
click "Show modal"
check that page contains "Content: The modal content"
click "Close"

check that page contains "MiscNotificationModules"
click "Open Alert Modal"
check that page contains "This is an alert message"
click "OK"

click "Open Confirm Modal"
check that page contains "this is the prompt message"
click "OK"
check that page contains "Confirm Status: Ok was clicked"

click "Open Confirm Modal"
check that page contains "this is the prompt message"
click "Cancel"
check that page contains "Confirm Status: Cancel was clicked"

click "Open Prompt Modal"
check that page contains "Please Respond"
type "Have a banana!"   // <===== when you cannot get to the element you can try to "type"; type tab moves focus
click "OK"
check that page contains "Entered value is: Have a banana!"

click "Open Prompt Modal"
check that page contains "Please Respond"
type "Have a pumpkin!" 
click "Cancel"
check that page doesn't contain "Entered value is: Have a pumpkin!"

check that page contains "MiscRestApiCall"
enter "Flying Spaghetti Monster" into "Search Books"
click "Search"
wait 5 seconds
check that the page contains "The Gospel of the Flying Spaghetti Monster"

  • Test Run:


NO-CODE UI TESTING: Guide for testRigor & Salesforce
5MB
LWC-00001_-_Long_test_case_Built-in_Ubuntu_Chrome_202412210417_b17b853a-1439-45c6-a052-aa331d52549d.pdf
pdf