@task
@regression
Feature: Program Task Lifecycle Management - 2
File name: taskautomation_suite_2.feature
Relative path: feature/taskautomation_suite_2.feature
@task
@regression
Scenario: Program Starts Tomorrow & Purchased with RazorPay & Coach Allocatted thorugh workflow & Task Auto Generation
Given
a lead exists in the system
00:00:05.230
And
the user is logged into the CRM as "Super Admin"
00:00:07.381
And
the user is on the Leads screen
00:00:12.273
And
Adding Mandatory Details for Payment with :
00:00:26.252
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
When
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Tomorrow is assigned to the lead with
00:00:23.852
And
the full payment for the package is made online via "Razorpay" i.e. via Razorpay
00:00:47.543
Then
the package status should be "Fully Paid"
00:00:03.201
And
the lead appears in the client list
00:00:04.500
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:17.537
And
the coach allocation and task generation entries are visible in the History tab after workflow triggered
00:00:08.236
Then
all program tasks are created immediately within the program tenure for tomorrow
00:00:03.063
And
the tasks are assigned to the respective allocated coaches for tomorrow
00:00:01.536
@task
@regression
Scenario: Program Starts Day After Tomorrow & Purchased with RazorPay & Coach Allocatted thorugh workflow & Task Auto Generation
Given
a lead exists in the system
00:00:04.310
And
the user is logged into the CRM as "Super Admin"
00:00:09.251
And
the user is on the Leads screen
00:00:11.901
And
Adding Mandatory Details for Payment with :
00:00:25.353
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
When
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Day after Tomorrow is assigned to the lead with
00:00:23.738
And
the full payment for the package is made online via "Razorpay" i.e. via Razorpay
00:00:46.838
Then
the package status should be "Fully Paid"
00:00:04.927
And
the lead appears in the client list
00:00:04.422
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:17.967
And
the coach allocation and task generation entries are visible in the History tab after workflow triggered
00:00:08.358
Then
all program tasks are created immediately within the program tenure for day after tomorrow
00:00:03.654
And
the tasks are assigned to the respective allocated coaches for day after tomorrow
00:00:01.479
Given
a lead exists in the system
00:00:05.193
And
the user is logged into the CRM as "Super Admin"
00:00:06.923
And
the user is on the Leads screen
00:00:13.985
And
Adding Mandatory Details for Payment with :
00:00:26.069
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
And
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Today is assigned to the lead with
00:00:23.704
And
the payment is successfully completed via "UPI"
00:00:16.792
And
the lead appears in the client list
00:00:04.654
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:19.100
And
the coach allocation and task generation entries are visible in the History tab after workflow triggered
00:00:08.429
Then
all program tasks are created immediately within the program tenure
00:00:02.559
And
the tasks are assigned to the respective allocated coaches
00:00:01.510
And
package is ended manually & task got moved to cancelled
00:00:08.176
Given
a lead exists in the system
00:00:06.355
And
the user is logged into the CRM as "Super Admin"
00:00:08.827
And
the user is on the Leads screen
00:00:12.218
And
Adding Mandatory Details for Payment with :
00:00:26.402
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
And
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Today is assigned to the lead with
00:00:24.105
And
the payment is successfully completed via "UPI"
00:00:16.779
And
the lead appears in the client list
00:00:04.346
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:19.190
And
the coach allocation and task generation entries are visible in the History tab after workflow triggered
00:00:08.251
Then
all program tasks are created immediately within the program tenure
00:00:02.692
And
the tasks are assigned to the respective allocated coaches
00:00:01.544
And
packge is ended from backend with forceful date change to previous day
00:00:42.157
+ Show Error
Error: expect(locator).toBeVisible() failed
Locator: locator('[data-testid="package-card"]').filter({ has: locator('p').filter({ hasText: 'Gold Elite - Automation' }) }).getByText('Ended', { exact: true })
Expected: visible
Timeout: 30000ms
Error: element(s) not found
Call log:
- Expect "toBeVisible" with timeout 30000ms
- waiting for locator('[data-testid="package-card"]').filter({ has: locator('p').filter({ hasText: 'Gold Elite - Automation' }) }).getByText('Ended', { exact: true })
at ../tests/ui_test/page/LeadPackagePage.js:2139
2137 | if (tags !== undefined) {
2138 | for (const tag of tags) {
) 2139 | await expect(packageCard.getByText(tag, { exact: true })).toBeVisible();
| ^
2140 | }
2141 | }
2142 | }
Given
a lead exists in the system
00:00:04.339
And
the user is logged into the CRM as "Super Admin"
00:00:09.091
And
the user is on the Leads screen
00:00:12.537
And
Adding Mandatory Details for Payment with :
00:00:26.067
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
And
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Today is assigned to the lead with
00:00:23.300
And
the payment is successfully completed via "UPI"
00:00:16.674
And
the lead appears in the client list
00:00:04.633
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:18.962
And
the coach allocation and task generation entries are visible in the History tab after workflow triggered
00:00:08.113
Then
all program tasks are created immediately within the program tenure
00:00:02.557
And
the tasks are assigned to the respective allocated coaches
00:00:01.559
When
program tasks are generated
00:00:00.027
Then
no tasks should be created on Sundays
00:00:00.004
And
user extends program for "100" days with reason "Emergency Travel", no tasks should be created on Sundays
00:00:10.896
@task
@regression
Scenario: Update coach for a specific task (Migration)
Given
a lead exists in the system
00:00:04.395
And
the user is logged into the CRM as "Super Admin"
00:00:08.854
And
the user is on the Leads screen
00:00:12.383
And
Adding Mandatory Details for Payment with :
00:00:26.213
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
And
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Today is assigned to the lead with
00:00:23.724
And
the payment is successfully completed via "UPI"
00:00:16.593
And
the lead appears in the client list
00:00:04.434
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:18.894
And
the coach allocation and task generation entries are visible in the History tab after workflow triggered
00:00:08.369
Then
all program tasks are created immediately within the program tenure
00:00:02.548
And
the tasks are assigned to the respective allocated coaches
00:00:01.481
When
a coach is updated to "Dhoni(VME005) as Nutrition" for a specific program task
00:01:00.373
+ Show Error
TimeoutError: locator.click: Timeout 60000ms exceeded.
Call log:
- waiting for locator('ul').getByRole('link', { name: 'Program Task', exact: true })
at ../tests/ui_test/page/SideMenu.js:110
108 | }
109 | async clickOnProgramTask() {
) 110 | await this.programTask.click();
| ^
111 | console.log('Clicked on Program Task in Side Menu');
112 | }
113 | async clickOnOtherTask() {
Then
only the selected task should be reassigned to the new coach
0s
@task
@regression
Scenario: Diet plan task completion requires Diet Plan Upload
Given
a lead exists in the system
00:00:04.288
And
the user is logged into the CRM as "Super Admin"
00:00:08.978
And
the user is on the Leads screen
00:00:12.771
And
Adding Mandatory Details for Payment with :
00:00:26.302
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
And
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Today is assigned to the lead with
00:00:23.999
And
the payment is successfully completed via "UPI"
00:00:16.573
And
the lead appears in the client list
00:00:04.485
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:18.990
And
the coach allocation and task generation entries are visible in the History tab after workflow triggered
00:00:08.316
Then
all program tasks are created immediately within the program tenure
00:00:02.534
And
the tasks are assigned to the respective allocated coaches
00:00:01.509
When
user tries to complete one diet plan task named "Diet Plan Call A 1", it should not allow
00:00:06.522
When
a diet plan is published for that
00:00:31.417
Then
now the corresponding diet plan task can be completed
00:00:16.164
@task
@regression
Scenario: Coach re-allocation AFTER few days of program start date & task workflow not to trigger
Given
a lead exists in the system
00:00:04.710
And
the user is logged into the CRM as "Super Admin"
00:00:07.692
And
the user is on the Leads screen
00:00:12.305
And
Adding Mandatory Details for Payment with :
00:00:26.199
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
And
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Today is assigned to the lead with
00:00:23.860
And
the payment is successfully completed via "UPI"
00:00:16.673
And
the lead appears in the client list
00:00:04.476
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:19.174
And
the package start date is changed to 7 days before the current date after the program is started
00:00:11.386
And
in History & Task Page, validated the task entry
00:00:08.383
And
again coach is changed to "Michelle(VME002) as Fitness" and "Dhoni(VME005) as Nutrition" from package page
00:00:15.750
And
the coach allocation and task generation entries are visible in the History tab with New Coaches after reallocation
00:00:12.735
@task
@regression
Scenario: Coach re-allocation BEFORE few days of program start date & task workflow not to trigger
Given
a lead exists in the system
00:00:04.209
And
the user is logged into the CRM as "Super Admin"
00:00:08.915
And
the user is on the Leads screen
00:00:12.841
And
Adding Mandatory Details for Payment with :
00:00:26.347
| Best time to Call | 10 AM to 2 PM |
|---|---|
| Target Weight | 120 |
| Diet Preference | Non-Vegetarian |
| Preferred Cusine | South Indian |
| Any Medical Condition | Diabetes |
When
the program "Gold Elite - Automation" for "90 day" of "₹ 3000.00 Rupees" with Start Date Day after Tomorrow is assigned to the lead with
00:00:23.927
And
the full payment for the package is made online via "Razorpay" i.e. via Razorpay
00:00:49.448
Then
the package status should be "Fully Paid"
00:00:03.122
And
the lead appears in the client list
00:00:04.416
And
coaches "Meera(VMC001) as Fitness" and "Tuhinangshu(VME0017) as Nutrition" are auto allocated through workflow
00:00:15.949
And
the coach allocation and task generation entries are visible in the History tab after workflow triggered
00:00:08.163
Then
all program tasks are created immediately within the program tenure for day after tomorrow
00:00:02.513
And
the tasks are assigned to the respective allocated coaches for day after tomorrow
00:00:01.596
And
again coach is changed to "Michelle(VME002) as Fitness" and "Dhoni(VME005) as Nutrition" from package page
00:00:16.040
And
the coach allocation and task generation entries are visible in the History tab with New Coaches after reallocation, where start date is still in future
00:00:12.584