From 8635c117a4cb51ef7ac914240a09f52f416bd021 Mon Sep 17 00:00:00 2001 From: lakshmi2506 Date: Wed, 15 May 2024 22:13:58 +0530 Subject: [PATCH] Set package namespac --- .github/PULL_REQUEST_TEMPLATE.md | 7 +++ .gitignore | 53 ++++++++++++++++++++ cumulusci.yml | 26 ++++++++++ datasets/mapping.yml | 45 +++++++++++++++++ orgs/beta.json | 20 ++++++++ orgs/dev.json | 24 +++++++++ orgs/feature.json | 24 +++++++++ orgs/release.json | 20 ++++++++ robot/solution/tests/create_contact.robot | 59 +++++++++++++++++++++++ sfdx-project.json | 1 + 10 files changed, 279 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .gitignore create mode 100644 cumulusci.yml create mode 100644 datasets/mapping.yml create mode 100644 orgs/beta.json create mode 100644 orgs/dev.json create mode 100644 orgs/feature.json create mode 100644 orgs/release.json create mode 100644 robot/solution/tests/create_contact.robot create mode 100644 sfdx-project.json diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..3debd97 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ + + +# Critical Changes + +# Changes + +# Issues Closed diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e1c7401 --- /dev/null +++ b/.gitignore @@ -0,0 +1,53 @@ +# CCI +.cci +/src.orig +/src + +# Python +*.pyc +__pycache__ + +# Robot Framework results +robot/solution/results/ + +# Salesforce cache +.sf/ +.sfdx/ +.localdevserver/ +deploy-options.json + +# LWC VSCode autocomplete +**/lwc/jsconfig.json + +# LWC Jest coverage reports +coverage/ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Dependency directories +node_modules/ + +# Eslint cache +.eslintcache + +# MacOS system files +.DS_Store + +# Windows system files +Thumbs.db +ehthumbs.db +[Dd]esktop.ini +$RECYCLE.BIN/ + +# Editors +*.sublime-project +*.sublime-workspace +.vscode +.idea +.project +.settings \ No newline at end of file diff --git a/cumulusci.yml b/cumulusci.yml new file mode 100644 index 0000000..75a2b12 --- /dev/null +++ b/cumulusci.yml @@ -0,0 +1,26 @@ +minimum_cumulusci_version: '3.85.0' +project: + name: solution + package: + name: solution + namespace: solution + api_version: '60.0' + git: + default_branch: 'main' + source_format: sfdx + +tasks: + robot: + options: + suites: robot/solution/tests + options: + outputdir: robot/solution/results + + robot_testdoc: + options: + path: robot/solution/tests + output: robot/solution/doc/solution_tests.html + + run_tests: + options: + required_org_code_coverage_percent: 75 diff --git a/datasets/mapping.yml b/datasets/mapping.yml new file mode 100644 index 0000000..caf7542 --- /dev/null +++ b/datasets/mapping.yml @@ -0,0 +1,45 @@ +Insert Accounts: + sf_object: Account + table: Account + fields: + Name: Name + Description: Description + BillingStreet: BillingStreet + BillingCity: BillingCity + BillingState: BillingState + BillingPostalCode: BillingPostalCode + BillingCountry: BillingCountry + ShippingStreet: ShippingStreet + ShippingCity: ShippingCity + ShippingState: ShippingState + ShippingPostalCode: ShippingPostalCode + ShippingCountry: ShippingCountry + Phone: Phone + Fax: Fax + Website: Website + NumberOfEmployees: NumberOfEmployees + AccountNumber: AccountNumber + Site: Site + Type: Type +Insert Contacts: + sf_object: Contact + table: Contact + fields: + Salutation: Salutation + FirstName: FirstName + LastName: LastName + Email: Email + Phone: Phone + MobilePhone: MobilePhone + OtherPhone: OtherPhone + HomePhone: HomePhone + Title: Title + Birthdate: Birthdate + MailingStreet: MailingStreet + MailingCity: MailingCity + MailingState: MailingState + MailingPostalCode: MailingPostalCode + MailingCountry: MailingCountry + lookups: + AccountId: + table: Account \ No newline at end of file diff --git a/orgs/beta.json b/orgs/beta.json new file mode 100644 index 0000000..1d4581d --- /dev/null +++ b/orgs/beta.json @@ -0,0 +1,20 @@ +{ + "orgName": "solution - Beta Test Org", + "edition": "Developer", + "settings": { + "lightningExperienceSettings": { + "enableS1DesktopEnabled": true + }, + "chatterSettings": { + "enableChatter": true + }, + "userManagementSettings": { + "enableNewProfileUI": true + }, + "securitySettings": { + "enableAdminLoginAsAnyUser": true, + "sessionSettings": { + "forceRelogin": false + } + } } +} \ No newline at end of file diff --git a/orgs/dev.json b/orgs/dev.json new file mode 100644 index 0000000..3bedb15 --- /dev/null +++ b/orgs/dev.json @@ -0,0 +1,24 @@ +{ + "orgName": "solution - Dev Org", + "edition": "Developer", + "settings": { + "lightningExperienceSettings": { + "enableS1DesktopEnabled": true + }, + "chatterSettings": { + "enableChatter": true + }, + "userManagementSettings": { + "enableNewProfileUI": true + }, + "securitySettings": { + "enableAdminLoginAsAnyUser": true, + "sessionSettings": { + "forceRelogin": false + } + }, + "languageSettings": { + "enableTranslationWorkbench": true + } + } +} \ No newline at end of file diff --git a/orgs/feature.json b/orgs/feature.json new file mode 100644 index 0000000..0d23607 --- /dev/null +++ b/orgs/feature.json @@ -0,0 +1,24 @@ +{ + "orgName": "solution - Feature Test Org", + "edition": "Developer", + "settings": { + "lightningExperienceSettings": { + "enableS1DesktopEnabled": true + }, + "chatterSettings": { + "enableChatter": true + }, + "userManagementSettings": { + "enableNewProfileUI": true + }, + "securitySettings": { + "enableAdminLoginAsAnyUser": true, + "sessionSettings": { + "forceRelogin": false + } + }, + "languageSettings": { + "enableTranslationWorkbench": true + } + } +} \ No newline at end of file diff --git a/orgs/release.json b/orgs/release.json new file mode 100644 index 0000000..f99014d --- /dev/null +++ b/orgs/release.json @@ -0,0 +1,20 @@ +{ + "orgName": "solution - Release Test Org", + "edition": "Enterprise", + "settings": { + "lightningExperienceSettings": { + "enableS1DesktopEnabled": true + }, + "chatterSettings": { + "enableChatter": true + }, + "userManagementSettings": { + "enableNewProfileUI": true + }, + "securitySettings": { + "enableAdminLoginAsAnyUser": true, + "sessionSettings": { + "forceRelogin": false + } + } } +} \ No newline at end of file diff --git a/robot/solution/tests/create_contact.robot b/robot/solution/tests/create_contact.robot new file mode 100644 index 0000000..d284dc0 --- /dev/null +++ b/robot/solution/tests/create_contact.robot @@ -0,0 +1,59 @@ +*** Settings *** + +Resource cumulusci/robotframework/Salesforce.robot +Library cumulusci.robotframework.PageObjects + +Suite Setup Open Test Browser +Suite Teardown Delete Records and Close Browser + + +*** Test Cases *** + +Via API + ${first_name} = Get fake data first_name + ${last_name} = Get fake data last_name + + ${contact_id} = Salesforce Insert Contact + ... FirstName=${first_name} + ... LastName=${last_name} + + &{contact} = Salesforce Get Contact ${contact_id} + Validate Contact ${contact_id} ${first_name} ${last_name} + +Via UI + ${first_name} = Get fake data first_name + ${last_name} = Get fake data last_name + + Go to page Home Contact + Click Object Button New + Wait for modal New Contact + + Populate Form + ... First Name=${first_name} + ... Last Name=${last_name} + Click Modal Button Save + + Wait Until Modal Is Closed + + ${contact_id} = Get Current Record Id + Store Session Record Contact ${contact_id} + Validate Contact ${contact_id} ${first_name} ${last_name} + + +*** Keywords *** + +Validate Contact + [Arguments] ${contact_id} ${first_name} ${last_name} + [Documentation] + ... Given a contact id, validate that the contact has the + ... expected first and last name both through the detail page in + ... the UI and via the API. + + # Validate via UI + Go to page Detail Contact ${contact_id} + Page Should Contain ${first_name} ${last_name} + + # Validate via API + &{contact} = Salesforce Get Contact ${contact_id} + Should Be Equal ${first_name} ${contact}[FirstName] + Should Be Equal ${last_name} ${contact}[LastName] diff --git a/sfdx-project.json b/sfdx-project.json new file mode 100644 index 0000000..a11b751 --- /dev/null +++ b/sfdx-project.json @@ -0,0 +1 @@ +{"packageDirectories": [{"path": "force-app", "default": true}], "namespace": "solution", "sourceApiVersion": "60.0"} \ No newline at end of file