[ABTEST-141] [Investigation] Validate the selected goal is applicable in all variants Created: 03/Feb/20  Updated: 19/Oct/20  Resolved: 24/Sep/20

Status: Closed
Project: A/B Testing
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Story Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Chuong Doan Huy
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 1d 7h
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by ABTEST-325 Validate the selected goal is valid f... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: ABTEST MVP
Sprint: Add-Ons 47
Story Points: 5

 Description   

AC

  • Have a mechanism to validate the selected goal can be applied to all chosen variants
  • Warn user in a case when validation has not passed with proper information
  • Save action should have a hook to this validation
  • Start action should not let the test to start if it is not valid


 Comments   
Comment by Chuong Doan Huy [ 23/Sep/20 ]

This is the situation after investigation :

  • When user edit variant of an ab testing page (added more components or event removed selected element...), we want to check whether the selected goal (css selector) is still valid or not.
  • This is quite easy as we just need to retrieve the element by css selector and check if it's exist or not.

The BIG problem is that when in "edit mode" of pages, built-in component bar of Magnolia (green bar with action like edit, move component...) will screw up the original css selector path. For example, this css selector "HTML > BODY:nth-child(2) > SPAN:nth-child(3) > A:nth-child(1)" works for original page (in normal page mode), but in edit mode (with added a lot of element like DIV, SPAN...) that css selector is not correct anymore (tested).

Some work arounds :

  1. When user edit page variant, force them click on action something like "Check selected goal" (this action will open page in preview mode - no Magnolia component anymore, so we can use the css selector to check if it's still valid or not, and warn user then save flag e.g "invalidVariant" to jcr. This is later use to check when user click save or start the test).
  2. Hook selected element via element "id". This is easy for ab testing side, but for user, they will have to know their element id to input to abtesting app.
  3. Use some lib to load page and check element in memory like Selenium to check selected goal for variant.
Generated at Sun Feb 11 22:53:17 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.