Ejemplo n.º 1
0
        private void SaveShapesToShapesLab(IShapesLabController shapesLab, int shapesSlideNum, int testSlideNum)
        {
            PpOperations.SelectSlide(shapesSlideNum);
            PpOperations.SelectShapesByPrefix("selectMe");
            // save shapes
            shapesLab.SaveSelectedShapes();

            Microsoft.Office.Interop.PowerPoint.Slide actualSlide = PpOperations.SelectSlide(testSlideNum);
            AddShapesToSlideFromShapesLab(shapesLab, "selectMe1", "Group selectMe1");
        }
Ejemplo n.º 2
0
        private void TestSaveShapesToShapesLab(IShapesLabController shapesLab)
        {
            PpOperations.SelectSlide(3);
            PpOperations.SelectShapesByPrefix("selectMe");
            // save shapes
            shapesLab.SaveSelectedShapes();

            Microsoft.Office.Interop.PowerPoint.Slide actualSlide = PpOperations.SelectSlide(4);
            AddShapesToSlideFromShapesLab(shapesLab, "selectMe1", "Group selectMe1");

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

            SlideUtil.IsSameLooking(expSlide, actualSlide);
            SlideUtil.IsSameAnimations(expSlide, actualSlide);
        }
Ejemplo n.º 3
0
        private void TestSaveShapesToShapesLab(IShapesLabController shapesLab)
        {
            PpOperations.SelectSlide(3);
            PpOperations.SelectShapesByPrefix("selectMe");
            // save shapes
            shapesLab.SaveSelectedShapes();

            var actualSlide = PpOperations.SelectSlide(4);
            var addedThumbnail = shapesLab.GetLabeledThumbnail("My Shape Untitled");
            addedThumbnail.FinishNameEdit();
            // add shapes back
            DoubleClick(addedThumbnail as Control);
            var shapes = PpOperations.SelectShapesByPrefix("Group My Shape");
            Assert.IsTrue(shapes.Count > 0, "Failed to add shapes from Shapes Lab." +
                                            "UI test is flaky, pls re-run.");

            var expSlide = PpOperations.SelectSlide(5);

            SlideUtil.IsSameLooking(expSlide, actualSlide);
            SlideUtil.IsSameAnimations(expSlide, actualSlide);
        }
Ejemplo n.º 4
0
        private void TestSaveShapesToShapesLab(IShapesLabController shapesLab)
        {
            PpOperations.SelectSlide(3);
            PpOperations.SelectShapesByPrefix("selectMe");
            // save shapes
            shapesLab.SaveSelectedShapes();

            var actualSlide    = PpOperations.SelectSlide(4);
            var addedThumbnail = shapesLab.GetLabeledThumbnail("My Shape Untitled");

            addedThumbnail.FinishNameEdit();
            // add shapes back
            DoubleClick(addedThumbnail as Control);
            var shapes = PpOperations.SelectShapesByPrefix("Group My Shape");

            Assert.IsTrue(shapes.Count > 0, "Failed to add shapes from Shapes Lab." +
                          "UI test is flaky, pls re-run.");

            var expSlide = PpOperations.SelectSlide(5);

            SlideUtil.IsSameLooking(expSlide, actualSlide);
            SlideUtil.IsSameAnimations(expSlide, actualSlide);
        }