< Summary

Class:DCL.Tutorial.TutorialStep_Tooltip_ExploreButton
Assembly:Onboarding
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Tutorial/Scripts/Steps/Initial/TutorialStep_Tooltip_ExploreButton.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:51
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
OnStepStart()0%2100%
OnStepFinished()0%2100%
SetTooltipPosition()0%30500%
ExploreV2IsOpenChanged(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Tutorial/Scripts/Steps/Initial/TutorialStep_Tooltip_ExploreButton.cs

#LineLine coverage
 1using DCL.Helpers;
 2
 3namespace DCL.Tutorial
 4{
 5    /// <summary>
 6    /// Class that represents the onboarding tutorial step related to how to open the Explore window from the taskbar.
 7    /// </summary>
 8    public class TutorialStep_Tooltip_ExploreButton : TutorialStep_Tooltip
 9    {
 10        private const string PLAYER_PREFS_START_MENU_SHOWED = "StartMenuFeatureShowed";
 11        private const int TEACHER_CANVAS_SORT_ORDER_START = 5;
 12
 13        public override void OnStepStart()
 14        {
 015            base.OnStepStart();
 16
 017            DataStore.i.exploreV2.isOpen.OnChange += ExploreV2IsOpenChanged;
 18
 019            tutorialController.SetTeacherCanvasSortingOrder(TEACHER_CANVAS_SORT_ORDER_START);
 020        }
 21
 22        public override void OnStepFinished()
 23        {
 024            base.OnStepFinished();
 25
 26            // TODO (Santi): This a TEMPORAL fix. It will be removed when we refactorize the tutorial system in order to
 027            PlayerPrefsBridge.SetInt(PLAYER_PREFS_START_MENU_SHOWED, 1);
 28
 029            DataStore.i.exploreV2.isOpen.OnChange -= ExploreV2IsOpenChanged;
 030        }
 31
 32        protected override void SetTooltipPosition()
 33        {
 034            base.SetTooltipPosition();
 35
 036            if (tutorialController != null &&
 37                tutorialController.hudController != null &&
 38                tutorialController.hudController.profileHud != null &&
 39                tutorialController.hudController.profileHud.TutorialTooltipReference)
 40            {
 041                tooltipTransform.position = tutorialController.hudController.profileHud.TutorialTooltipReference.positio
 42            }
 043        }
 44
 45        internal void ExploreV2IsOpenChanged(bool current, bool previous)
 46        {
 047            if (current)
 048                stepIsFinished = true;
 049        }
 50    }
 51}