Exemple #1
0
        private void DrawClasses()
        {
            float footer = 0;

            footer += UITestToolWindowFooter.HEIGHT + EditorUIConstants.LAYOUT_PADDING;

            if (PlayModeTestRunner.IsRunning)
            {
                footer += PROGRESS_BAR_HEIGHT + EditorUIConstants.LAYOUT_PADDING;
            }

            bool needToRepaint = twoSectionDrawer.Draw(
                position,
                GUILayoutUtility.GetLastRect().max.y,
                footer, EditorStyles.helpBox,
                () =>
            {
                var isDirty = rootNode.View.Draw();
                if (isDirty)
                {
                    SetSerializedTestsDirty();
                }
            },
                GUIStyle.none,
                DrawLowerSection);

            CheckAssetIsDirty();
            if (needToRepaint)
            {
                Repaint();
            }
        }
Exemple #2
0
        private void OnEnable()
        {
            drawersFactory            = new ParameterDrawersFactory();
            footer                    = new UITestToolWindowFooter();
            isOpen                    = true;
            normalIconTexture         = Resources.Load("test_record_color") as Texture;
            normalIconContent         = new GUIContent("Recorder", normalIconTexture);
            grayscaleIconTexture      = Resources.Load("test_record_grayscale") as Texture;
            grayscaleIconContent      = new GUIContent("Recorder", grayscaleIconTexture);
            EditorApplication.update += DoUpdate;
            if (controller == null)
            {
                controller = new UITestUserFlowRecorderController();
            }
            //            CreateFakeActions();

            if (twoSectionDrawer == null)
            {
                twoSectionDrawer = new TwoSectionWithSliderDrawer(
                    70,
                    50,
                    int.MaxValue
                    );
            }
        }
 private void OnEnable()
 {
     footer = new UITestToolWindowFooter();
     Selection.selectionChanged += Repaint;
     userFlowModel   = new UserFlowModel();
     generatedCodes  = new List <string>();
     generatedLabels = new List <string>();
     userFlowModel.FetchAssertationMethods();
 }
Exemple #4
0
        private void OnEnable()
        {
            footer = new UITestToolWindowFooter();
            if (twoSectionDrawer == null)
            {
                twoSectionDrawer = new TwoSectionWithSliderDrawer(
                    50,
                    50,
                    int.MaxValue
                    );
            }
            LoadImgs();

            PlayModeTestRunner.OnMethodStateUpdated += Repaint;
            TestStep.OnTestStepUpdated += Repaint;
            EditorApplication.update   += OnEditorUpdate;
        }