コード例 #1
0
        private void Sync(ISyncLabController syncLab, int originalSlide, int expectedSlide,
                          string fromShape, string toShape, int categoryPosition, int itemPosition)
        {
            PpOperations.SelectSlide(originalSlide);
            PpOperations.SelectShape(fromShape);

            CopyStyle(syncLab, categoryPosition, itemPosition);

            PpOperations.SelectShape(toShape);
            syncLab.Sync(0);

            IsSame(originalSlide, expectedSlide, toShape);
        }
コード例 #2
0
        private void TestErrorDialogs(ISyncLabController syncLab)
        {
            PpOperations.SelectSlide(OriginalSyncGroupToShapeSlideNo);

            // no selection copy
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     "Please select one shape to copy.", syncLab.Copy, "Ok");

            // 2 item selected copy
            List <String> shapes = new List <string> {
                Line, RotatedArrow
            };

            PpOperations.SelectShapes(shapes);
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     "Please select one shape to copy.", syncLab.Copy, "Ok");

            // group selected copy
            PpOperations.SelectShape(Group);
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     "Please select one shape to copy.", syncLab.Copy, "Ok");

            // copy blank item for the paste error dialog test
            PpOperations.SelectShape(Line);
            CopyStyle(syncLab);

            // no selection sync
            PpOperations.SelectSlide(ExpectedSyncShapeToGroupSlideNo);
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     "Please select at least one item to apply this format to.", () => syncLab.Sync(0), "Ok");
        }
コード例 #3
0
ファイル: SyncLabTest.cs プロジェクト: tankztz/PowerPointLabs
        private void TestErrorDialogs(ISyncLabController syncLab)
        {
            PpOperations.SelectSlide(OriginalSyncGroupToShapeSlideNo);

            // no selection copy
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     SyncLabText.ErrorCopySelectionInvalid, syncLab.Copy, "Ok");

            // 2 item selected copy
            List <String> shapes = new List <string> {
                Line, RotatedArrow
            };

            PpOperations.SelectShapes(shapes);
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     SyncLabText.ErrorCopySelectionInvalid, syncLab.Copy, "Ok");

            // group selected copy
            PpOperations.SelectShape(Group);
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     SyncLabText.ErrorCopySelectionInvalid, syncLab.Copy, "Ok");

            // copy blank item for the paste error dialog test
            PpOperations.SelectShape(Line);
            CopyStyle(syncLab);

            // no selection sync
            PpOperations.SelectSlide(ExpectedSyncShapeToGroupSlideNo);
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     SyncLabText.ErrorPasteSelectionInvalid, () => syncLab.Sync(0), "Ok");

            // smart art
            PpOperations.SelectSlide(SmartArtSlideNo);
            PpOperations.SelectShape(SmartArt);
            MessageBoxUtil.ExpectMessageBoxWillPopUp(SyncLabText.ErrorDialogTitle,
                                                     SyncLabText.ErrorSmartArtUnsupported, syncLab.Copy, "Ok");
        }