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); }
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); }
private static void AutoAnimateWithCopyPasteShapesSuccessfully() { PpOperations.SelectSlide(8); PpOperations.SelectShapes(new List <string> { "Notched Right Arrow 3", "Group 2" }); // use keyboard to copy & paste, // otherwise API's copy & paste won't trigger special clipboard event. KeyboardUtil.Copy(); PpOperations.SelectSlide(9); KeyboardUtil.Paste(); Assert.IsNotNull(PpOperations.SelectShape("Notched Right Arrow 3"), "Copy-Paste failed, this task is flaky so please re-run."); var sh1 = PpOperations.SelectShape("Notched Right Arrow 3")[1]; sh1.Rotation += 90; var sh2 = PpOperations.SelectShape("Group 2")[1]; sh2.Rotation += 90; // go back to slide 8 PpOperations.SelectSlide(8); PplFeatures.AutoAnimate(); var actualSlide = PpOperations.SelectSlide(9); // remove elements that affect comparing slides PpOperations.SelectShapesByPrefix("text").Delete(); var 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); }