private void TestMultipleShapesFixed(IPositionsLabController positionsLab)
        {
            Slide actualSlide = PpOperations.SelectSlide(OriginalShapesSlideNoTestMultipleFixed);

            _shapeNames = new List<string> { Rectangle, Oval, Triangle };
            Shape shapeStart = PpOperations.SelectShape(Oval)[1];
            Shape shapeEnd = PpOperations.SelectShape(Target)[1];
            PpOperations.SelectShapes(_shapeNames);

            positionsLab.ReorientFixed();
            positionsLab.ToggleDuplicateAndRotateButton();

            RotateShape(shapeStart, shapeEnd);

            Slide expSlide = PpOperations.SelectSlide(ExpectedShapesSlideNoTestMultipleFixed);
            SlideUtil.IsSameLooking(expSlide, actualSlide);
        }
Esempio n. 2
0
        public void TestAlignCenterDefault()
        {
            PositionsLabSettings.AlignReference = PositionsLabSettings.AlignReferenceObject.PowerpointDefaults;
            _shapeNames = new List <string> {
                UnrotatedRectangle, Oval, RotatedArrow, RotatedRectangle
            };
            PowerPoint.ShapeRange actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);
            float slideHeight = Pres.PageSetup.SlideHeight;
            float slideWidth  = Pres.PageSetup.SlideWidth;

            PositionsLabMain.AlignCenter(actualShapes, slideHeight, slideWidth);

            PpOperations.SelectSlide(AlignShapesCenterDefaultNo);
            PowerPoint.ShapeRange expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 3
0
        public void TestAdjoinVerticalWithoutAlign()
        {
            PositionsLabMain.AdjoinWithoutAligning();
            _shapeNames = new List <string> {
                UnrotatedRectangle, Oval, RotatedArrow, RotatedRectangle
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);

            Action <List <PPShape> > positionsAction = (shapes) => PositionsLabMain.AdjoinVertical(shapes);

            ExecutePositionsAction(positionsAction, actualShapes);

            PpOperations.SelectSlide(AdjoinVerticalWithoutAlignNo);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 4
0
        public void TestAlignOneCenterSingleShape()
        {
            PositionsLabSettings.AlignReference = PositionsLabSettings.AlignReferenceObject.SelectedShape;
            _shapeNames = new List <string> {
                RotatedRectangle
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);
            var slideHeight  = Pres.PageSetup.SlideHeight;
            var slideWidth   = Pres.PageSetup.SlideWidth;

            PositionsLabMain.AlignCenter(actualShapes, slideHeight, slideWidth);

            PpOperations.SelectSlide(AlignOneShapeCenterDefaultNo);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 5
0
        private static void AutoAnimateSuccessfully()
        {
            PpOperations.SelectSlide(4);

            PplFeatures.AutoAnimate();

            Microsoft.Office.Interop.PowerPoint.Slide actualSlide = PpOperations.SelectSlide(5);
            // remove elements that affect comparing slides
            PpOperations.SelectShapesByPrefix("text").Delete();

            Microsoft.Office.Interop.PowerPoint.Slide expSlide = PpOperations.SelectSlide(7);
            // remove elements that affect comparing slides
            PpOperations.SelectShapesByPrefix("text").Delete();

            SlideUtil.IsSameAnimations(expSlide, actualSlide);
            SlideUtil.IsSameLooking(expSlide, actualSlide);
        }
Esempio n. 6
0
        public void TestDistributeAngleWithinSecondAndThirdWithCenterFixedShapeOrientation()
        {
            PositionsLabSettings.DistributeRadialReference  = PositionsLabSettings.DistributeRadialReferenceObject.SecondThirdShape;
            PositionsLabSettings.DistributeSpaceReference   = PositionsLabSettings.DistributeSpaceReferenceObject.ObjectCenter;
            PositionsLabSettings.DistributeShapeOrientation = PositionsLabSettings.RadialShapeOrientationObject.Fixed;

            PowerPoint.ShapeRange actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);

            Action <PowerPoint.ShapeRange> positionsAction = (shapes) => PositionsLabMain.DistributeRadial(shapes);

            ExecutePositionsAction(positionsAction, actualShapes, isConvertPPShape: false);

            PpOperations.SelectSlide(DistributeAngleWithinSecondAndThirdWithCenterFixedShapeOrientationSlide);
            PowerPoint.ShapeRange expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 7
0
        private void TestEditLineColorAndDeleteTimeMarkerPb(ITimerLabController timerLab)
        {
            PpOperations.SelectSlide(ChangeLineColorAndRecreateTimeMarkerSlideNo);
            int expectedColor = PpOperations.SelectShape(TimerLineMarkerGroup)[1].Line.ForeColor.RGB;

            PpOperations.SelectSlide(PbOriginalSlideNo);
            ShapeRange lineMarkerGroup = PpOperations.SelectShape(TimerLineMarkerGroup);

            lineMarkerGroup.Line.ForeColor.RGB = expectedColor;
            ShapeRange timeMarkerGroup = PpOperations.SelectShape(TimerTimeMarkerGroup);

            timeMarkerGroup.Delete();

            MessageBoxUtil.ExpectMessageBoxWillPopUp("Error",
                                                     "Only one timer allowed per slide.", timerLab.ClickCreateButton, "Ok");
            AssertIsSame(PbOriginalSlideNo, PbChangeLineColorAndRecreateTimeMarkerSlideNo);
        }
Esempio n. 8
0
        public void TestAlignTopToRefShape()
        {
            PositionsLabSettings.AlignReference = PositionsLabSettings.AlignReferenceObject.SelectedShape;
            _shapeNames = new List <string> {
                RotatedRectangle, UnrotatedRectangle, Oval, RotatedArrow
            };
            PowerPoint.ShapeRange actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);

            Action <PowerPoint.ShapeRange> positionsAction = shapes => PositionsLabMain.AlignTop(shapes);

            ExecutePositionsAction(positionsAction, actualShapes);

            PpOperations.SelectSlide(AlignShapesTopToRefShapeNo);
            PowerPoint.ShapeRange expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
        public void FT_AnimateInSlideTest()
        {
            PpOperations.SelectSlide(4);
            PpOperations.SelectShapes(new List <string> {
                "Rectangle 2", "Rectangle 5", "Rectangle 6"
            });

            PplFeatures.AnimateInSlide();

            Microsoft.Office.Interop.PowerPoint.Slide actualSlide = PpOperations.SelectSlide(4);
            Microsoft.Office.Interop.PowerPoint.Slide expSlide    = PpOperations.SelectSlide(5);

            // remove text "Expected"
            PpOperations.SelectShape("text 3")[1].Delete();
            SlideUtil.IsSameAnimations(expSlide, actualSlide);
            SlideUtil.IsSameLooking(expSlide, actualSlide);
        }
        public void TestDistributeAngleAtSecondWithEdgesDynamicShapeOrientation()
        {
            PositionsLabSettings.DistributeRadialReference  = PositionsLabSettings.DistributeRadialReferenceObject.AtSecondShape;
            PositionsLabSettings.DistributeSpaceReference   = PositionsLabSettings.DistributeSpaceReferenceObject.ObjectBoundary;
            PositionsLabSettings.DistributeShapeOrientation = PositionsLabSettings.RadialShapeOrientationObject.Dynamic;

            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);

            Action <PowerPoint.ShapeRange> positionsAction = (shapes) => PositionsLabMain.DistributeRadial(shapes);

            ExecutePositionsAction(positionsAction, actualShapes, isConvertPPShape: false);

            PpOperations.SelectSlide(DistributeAngleAtSecondWithEdgesDynamicShapeOrientationSlide);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
        public void TestAdjoinHorizontalWithAlignWithRotatedRef()
        {
            PositionsLabMain.AdjoinWithAligning();
            _shapeNames = new List <string> {
                RotatedRectangle, UnrotatedRectangle, Oval, RotatedArrow
            };
            PowerPoint.ShapeRange actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);

            Action <List <PPShape> > positionsAction = (shapes) => PositionsLabMain.AdjoinHorizontal(shapes);

            ExecutePositionsAction(positionsAction, actualShapes);

            PpOperations.SelectSlide(AdjoinHorizontalWithAlignWithRotatedRef);
            PowerPoint.ShapeRange expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
        public void TextSyncSuccessful()
        {
            PplFeatures.SynchronizeAgenda();

            // Duplicate template slide and delete original template slide. It should use the duplicate as the new template slide.
            Microsoft.Office.Interop.PowerPoint.Slide firstSlide = PpOperations.SelectSlide(1);
            PpOperations.SelectShape("PPTTemplateMarker").Delete();
            firstSlide.Duplicate();
            firstSlide.Delete();

            PplFeatures.SynchronizeAgenda();

            System.Collections.Generic.List <TestInterface.ISlideData> actualSlides   = PpOperations.FetchCurrentPresentationData();
            System.Collections.Generic.List <TestInterface.ISlideData> expectedSlides = PpOperations.FetchPresentationData(
                PathUtil.GetDocTestPresentationPath("AgendaLab\\AgendaSlidesTextAfterSync.pptx"));
            PresentationUtil.AssertEqual(expectedSlides, actualSlides);
        }
Esempio n. 13
0
        private static void ConvertSingleObjToPicture()
        {
            var actualSlide = PpOperations.SelectSlide(4);

            PpOperations.SelectShape("pic");

            PplFeatures.ConvertToPic();

            var sh = PpOperations.SelectShapesByPrefix("Picture")[1] as Shape;

            Assert.AreEqual(MsoShapeType.msoPicture, sh.Type);

            var expSlide = PpOperations.SelectSlide(5);

            PpOperations.SelectShape("text 3")[1].Delete();
            SlideUtil.IsSameLooking(expSlide, actualSlide);
        }
Esempio n. 14
0
        public void TestAlignLeftToSlide()
        {
            PositionsLabMain.AlignReferToSlide();
            _shapeNames = new List <string> {
                UnrotatedRectangle, Oval, RotatedArrow, RotatedRectangle
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);

            Action <PowerPoint.ShapeRange> positionsAction = shapes => PositionsLabMain.AlignLeft(shapes);

            ExecutePositionsAction(positionsAction, actualShapes);

            PpOperations.SelectSlide(AlignShapesLeftToSlideNo);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 15
0
        public void TestAlignCenterDefault()
        {
            PositionsLabMain.AlignReferToPowerpointDefaults();
            _shapeNames = new List <string> {
                UnrotatedRectangle, Oval, RotatedArrow, RotatedRectangle
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);
            var slideHeight  = Pres.PageSetup.SlideHeight;
            var slideWidth   = Pres.PageSetup.SlideWidth;

            PositionsLabMain.AlignCenter(actualShapes, slideHeight, slideWidth);

            PpOperations.SelectSlide(AlignShapesCenterDefaultNo);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 16
0
        private void TestEditTextColorAndDeleteProgressBarPb(ITimerLabController timerLab)
        {
            PpOperations.SelectSlide(ChangeTextColorAndRecreateSliderSlideNo);
            int expectedColor = PpOperations.SelectShape(TimerTimeMarkerGroup)[1].TextFrame.TextRange.Font.Color.RGB;

            PpOperations.SelectSlide(PbOriginalSlideNo);
            ShapeRange timeMarkerGroup = PpOperations.SelectShape(TimerTimeMarkerGroup);

            timeMarkerGroup.TextFrame.TextRange.Font.Color.RGB = expectedColor;
            ShapeRange progressBar = PpOperations.SelectShape(ProgressBar);

            progressBar.Delete();

            MessageBoxUtil.ExpectMessageBoxWillPopUp("Error",
                                                     "Only one timer allowed per slide.", timerLab.ClickCreateButton, "Ok");
            AssertIsSame(PbOriginalSlideNo, PbChangeTextColorAndRecreateSliderSlideNo);
        }
Esempio n. 17
0
        private void TestCopyCustomPerspectiveShadow(ISyncLabController syncLab)
        {
            PpOperations.SelectSlide(CustomPerspectiveShadowSlideNo);
            PpOperations.SelectShape(CustomPerspectiveShadow);

            // shadow item
            int categoryIndex = 3;
            int itemIndex     = 0;

            new Task(() =>
            {
                ThreadUtil.WaitFor(1000);
                syncLab.DialogSelectItem(categoryIndex, itemIndex);
                MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.WarningDialogTitle,
                                                         SyncLabText.WarningSyncPerspectiveShadow, syncLab.DialogClickOk, "Ok");
            }).Start();
            syncLab.Copy();
        }
Esempio n. 18
0
        public void TestAlignVerticalToRefShape()
        {
            PositionsLabMain.AlignReferToShape();
            _shapeNames = new List <string> {
                RotatedRectangle, UnrotatedRectangle, Oval, RotatedArrow
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);
            var slideWidth   = Pres.PageSetup.SlideWidth;

            Action <PowerPoint.ShapeRange, float> positionsAction = (shapes, width) => PositionsLabMain.AlignVerticalCenter(shapes, width);

            ExecutePositionsAction(positionsAction, actualShapes, slideWidth);

            PpOperations.SelectSlide(AlignShapesVerticalToRefShapeNo);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 19
0
        public void TestAlignBottomToSlide()
        {
            PositionsLabMain.AlignReferToSlide();
            _shapeNames = new List <string> {
                UnrotatedRectangle, Oval, RotatedArrow, RotatedRectangle
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);
            var slideHeight  = Pres.PageSetup.SlideHeight;

            Action <PowerPoint.ShapeRange, float> positionsAction = (shapes, height) => PositionsLabMain.AlignBottom(shapes, height);

            ExecutePositionsAction(positionsAction, actualShapes, slideHeight);

            PpOperations.SelectSlide(AlignShapesBottomToSlideNo);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 20
0
        public void TestSwapLeftToRight1()
        {
            PositionsLabMain.IsSwapByClickOrder = false;
            PositionsLabMain.SwapReferencePoint = PositionsLabMain.SwapReference.MiddleCenter;
            _shapeNames = new List <string> {
                UnrotatedRectangle, Oval, RotatedArrow, RotatedRectangle
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);

            Action <List <PPShape>, bool> positionsAction = (shapes, isPreview) => PositionsLabMain.Swap(shapes, isPreview);

            ExecutePositionsAction(positionsAction, actualShapes, false);

            PpOperations.SelectSlide(SwapLeftToRight1Slide);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 21
0
        public void TestAlignRightToSlide()
        {
            PositionsLabSettings.AlignReference = PositionsLabSettings.AlignReferenceObject.Slide;
            _shapeNames = new List <string> {
                UnrotatedRectangle, Oval, RotatedArrow, RotatedRectangle
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);
            var slideWidth   = Pres.PageSetup.SlideWidth;

            Action <PowerPoint.ShapeRange, float> positionsAction = (shapes, width) => PositionsLabMain.AlignRight(shapes, width);

            ExecutePositionsAction(positionsAction, actualShapes, slideWidth);

            PpOperations.SelectSlide(AlignShapesRightToSlideNo);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 22
0
        private void SettingsAndSingleShapeSuccessfully()
        {
            PplFeatures.SetSpotlightProperties(0.01f, 50f, Color.FromArgb(0x00FF00));

            // This method is commented out since it currently does not work for WPF controls.
            // VerifySpotlightSettingsDialogBox();

            PpOperations.SelectSlide(4);
            PpOperations.SelectShape("Spotlight Me");
            PplFeatures.Spotlight();

            Microsoft.Office.Interop.PowerPoint.Slide actualSlide1 = PpOperations.SelectSlide(4);
            Microsoft.Office.Interop.PowerPoint.Slide actualSlide2 = PpOperations.SelectSlide(5);
            Microsoft.Office.Interop.PowerPoint.Slide expSlide1    = PpOperations.SelectSlide(6);
            Microsoft.Office.Interop.PowerPoint.Slide expSlide2    = PpOperations.SelectSlide(7);
            SlideUtil.IsSameLooking(expSlide1, actualSlide1);
            SlideUtil.IsSameLooking(expSlide2, actualSlide2);
        }
Esempio n. 23
0
        public void TestAlignHorizontalToRefShape()
        {
            PositionsLabSettings.AlignReference = PositionsLabSettings.AlignReferenceObject.SelectedShape;
            _shapeNames = new List <string> {
                RotatedRectangle, UnrotatedRectangle, Oval, RotatedArrow
            };
            var actualShapes = GetShapes(OriginalShapesSlideNo, _shapeNames);
            var slideHeight  = Pres.PageSetup.SlideHeight;

            Action <PowerPoint.ShapeRange, float> positionsAction = (shapes, height) => PositionsLabMain.AlignHorizontalCenter(shapes, height);

            ExecutePositionsAction(positionsAction, actualShapes, slideHeight);

            PpOperations.SelectSlide(AlignShapesHorizontalToRefShapeNo);
            var expectedShapes = PpOperations.SelectShapes(_shapeNames);

            CheckShapes(expectedShapes, actualShapes);
        }
Esempio n. 24
0
        public void TestGetTextBoxInfo()
        {
            PpOperations.SelectSlide(2);
            Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = PpOperations.SelectShapesByPrefix("TextBox");
            TextBoxes textBoxes = new TextBoxes(shapes,
                                                Pres.PageSetup.SlideWidth, Pres.PageSetup.SlideHeight);
            TextBoxInfo textBoxInfo = textBoxes.GetTextBoxesInfo();

            Assert.IsTrue(SlideUtil.IsRoughlySame(57.5200043f, textBoxInfo.Height));
            Assert.IsTrue(SlideUtil.IsRoughlySame(68.2f, textBoxInfo.Left));
            Assert.IsTrue(SlideUtil.IsRoughlySame(52.17752f, textBoxInfo.Top));
            Assert.IsTrue(SlideUtil.IsRoughlySame(710.945068f, textBoxInfo.Width));

            TextBoxes.AddMargin(textBoxInfo, 25);
            Assert.IsTrue(SlideUtil.IsRoughlySame(107.520004f, textBoxInfo.Height));
            Assert.IsTrue(SlideUtil.IsRoughlySame(43.1999969f, textBoxInfo.Left));
            Assert.IsTrue(SlideUtil.IsRoughlySame(27.17752f, textBoxInfo.Top));
            Assert.IsTrue(SlideUtil.IsRoughlySame(760.945068f, textBoxInfo.Width));
        }
        public void TextSyncSuccessful()
        {
            PplFeatures.SynchronizeAgenda();

            // Duplicate template slide and delete original template slide. It should use the duplicate as the new template slide.
            var firstSlide = PpOperations.SelectSlide(1);

            PpOperations.SelectShape("PPTTemplateMarker").Delete();
            firstSlide.Duplicate();
            firstSlide.Delete();

            PplFeatures.SynchronizeAgenda();

            var actualSlides   = PpOperations.FetchCurrentPresentationData();
            var expectedSlides = PpOperations.FetchPresentationData(
                PathUtil.GetDocTestPresentationPath("AgendaLab\\AgendaSlidesTextAfterSync.pptx"));

            PresentationUtil.AssertEqual(expectedSlides, actualSlides);
        }
        private static void AutoAnimateWithCopyPasteShapesSuccessfully()
        {
            PpOperations.SelectSlide(8);
            ShapeRange pastingShapes = PpOperations.SelectShapes(new List <string> {
                "Notched Right Arrow", "Group"
            });

            PPLClipboard.Instance.LockAndRelease(() =>
            {
                pastingShapes.Copy();

                Slide targetSlide = PpOperations.SelectSlide(9);
                targetSlide.Shapes.Paste();
            });

            Assert.IsNotNull(PpOperations.SelectShape("Notched Right Arrow"),
                             "Copy-Paste failed, this task is flaky so please re-run.");
            Shape sh1 = PpOperations.SelectShape("Notched Right Arrow")[1];

            sh1.Rotation += 90;
            Shape sh2 = PpOperations.SelectShape("Group")[1];

            sh2.Rotation += 90;

            // go back to slide 8
            PpOperations.SelectSlide(8);

            PplFeatures.AutoAnimate();

            Slide actualSlide = PpOperations.SelectSlide(9);

            // remove elements that affect comparing slides
            PpOperations.SelectShapesByPrefix("text").Delete();

            Slide expSlide = PpOperations.SelectSlide(11);

            // remove elements that affect comparing slides
            PpOperations.SelectShapesByPrefix("text").Delete();

            // TODO: actually this expected slide looks a bit strange..
            SlideUtil.IsSameAnimations(expSlide, actualSlide);
            SlideUtil.IsSameLooking(expSlide, actualSlide);
        }
        private static void AutoAnimateStraightLinesSuccessfully()
        {
            PpOperations.SelectSlide(38);

            PplFeatures.AutoAnimate();

            Slide actualSlide = PpOperations.SelectSlide(39);

            // remove elements that affect comparing slides
            PpOperations.SelectShape("Text Label Initial Slide")[1].Delete();

            Slide expSlide = PpOperations.SelectSlide(41);

            // remove elements that affect comparing slides
            PpOperations.SelectShape("Text Label Expected Output")[1].Delete();

            SlideUtil.IsSameAnimations(expSlide, actualSlide);
            SlideUtil.IsSameLooking(expSlide, actualSlide);
        }
Esempio n. 28
0
        public void TestGetTextBoxInfo()
        {
            PpOperations.SelectSlide(2);
            var shapes    = PpOperations.SelectShapesByPrefix("TextBox");
            var textBoxes = new TextBoxes(shapes,
                                          Pres.PageSetup.SlideWidth, Pres.PageSetup.SlideHeight);
            var textBoxInfo = textBoxes.GetTextBoxesInfo();

            Assert.IsTrue(SlideUtil.IsRoughlySame(348.4239f, textBoxInfo.Height));
            Assert.IsTrue(SlideUtil.IsRoughlySame(68.2f, textBoxInfo.Left));
            Assert.IsTrue(SlideUtil.IsRoughlySame(52.17752f, textBoxInfo.Top));
            Assert.IsTrue(SlideUtil.IsRoughlySame(741.0565f, textBoxInfo.Width));

            TextBoxes.AddMargin(textBoxInfo, 25);
            Assert.IsTrue(SlideUtil.IsRoughlySame(398.4239f, textBoxInfo.Height));
            Assert.IsTrue(SlideUtil.IsRoughlySame(43.1999969f, textBoxInfo.Left));
            Assert.IsTrue(SlideUtil.IsRoughlySame(27.17752f, textBoxInfo.Top));
            Assert.IsTrue(SlideUtil.IsRoughlySame(791.0565f, textBoxInfo.Width));
        }
        public void FT_AnimateInSlideStraightLinesTest()
        {
            PpOperations.SelectSlide(21);
            PpOperations.SelectShapes(new List <string> {
                "Straight Arrow Connector 61",
                "Straight Arrow Connector 63",
                "Straight Arrow Connector 66"
            });

            PplFeatures.AnimateInSlide();

            Microsoft.Office.Interop.PowerPoint.Slide actualSlide = PpOperations.SelectSlide(21);
            Microsoft.Office.Interop.PowerPoint.Slide expSlide    = PpOperations.SelectSlide(22);

            // remove text "Expected"
            PpOperations.SelectShape("Text Label Expected Output")[1].Delete();
            SlideUtil.IsSameAnimations(expSlide, actualSlide);
            SlideUtil.IsSameLooking(expSlide, actualSlide);
        }
        private void ConvertShapesToTooltipAndCompare(string[] shapeNames, int testSlideNo, int expectedSlideNo, bool isSuccessful)
        {
            Slide           slide          = PpOperations.SelectSlide(testSlideNo);
            PowerPointSlide currentSlide   = PowerPointSlide.FromSlideFactory(slide);
            ShapeRange      selectedShapes = PpOperations.SelectShapes(shapeNames);

            if (isSuccessful)
            {
                Assert.AreEqual(ConvertToTooltip.AddTriggerAnimation(currentSlide, selectedShapes), isSuccessful);
            }
            else
            {
                MessageBoxUtil.ExpectMessageBoxWillPopUp(
                    TooltipsLabText.ErrorTooltipsDialogTitle,
                    TooltipsLabText.ErrorLessThanTwoShapesSelected,
                    () => { ConvertToTooltip.AddTriggerAnimation(currentSlide, selectedShapes); });
            }
            AssertIsSame(testSlideNo, expectedSlideNo);
        }