public void ViewShareDashboardWidgetGrid01(ShareDashboardData input)
        {
            var dashboard = input.InputData.DashboardInfo;

            HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName);
            TimeManager.MediumPause();

            HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName);
            JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(30);
            TimeManager.LongPause();

            //Open share window
            HomePagePanel.ClickShareWidgetButton(dashboard[0].WidgetName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

            //Check there is title in the window.
            Assert.AreEqual(input.ExpectedData.messages[0], ShareWindow.GetTitle());

            //Check UserA, UserD, UserE. Check receivers realname checkbox.
            //Exclude userA in user list.
            ShareWindow.IsShareUserExistedOnWindow(dashboard[0].ReceiveUsers[0]);
            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[0]);
            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[1]);
            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[2]);

            //The realname display in share to textfield.
            Assert.AreEqual(3, ShareWindow.GetShareUserNumber());
            Assert.IsTrue(ShareWindow.IsShareUserInSendedList(dashboard[0].ShareUsers[0]));
            Assert.IsTrue(ShareWindow.IsShareUserInSendedList(dashboard[0].ShareUsers[1]));
            Assert.IsTrue(ShareWindow.IsShareUserInSendedList(dashboard[0].ShareUsers[2]));

            //Uncheck receivers realname checkbox.
            ShareWindow.UncheckShareUser(dashboard[0].ShareUsers[0]);
            TimeManager.ShortPause();

            //The realname disappear in sent to textfield.
            Assert.IsFalse(ShareWindow.IsShareUserInSendedList(dashboard[0].ShareUsers[0]));
            Assert.AreEqual(2, ShareWindow.GetShareUserNumber());

            //Click "X" button from the send to textfield.
            ShareWindow.ClickRemoveShareUserButton(dashboard[0].ShareUsers[1]);
            TimeManager.ShortPause();

            //The realname disappear in sent to textfield.
            Assert.IsFalse(ShareWindow.IsShareUserInSendedList(dashboard[0].ShareUsers[1]));
            Assert.AreEqual(1, ShareWindow.GetShareUserNumber());

            //Click CheckAll checkbox.
            ShareWindow.CheckAllShareUsers();
            TimeManager.MediumPause();

            //All receivers are checked and display in send to textfield.
            Assert.IsTrue(ShareWindow.IsAllShareUsersChecked());

            ShareWindow.ClickGiveupButton();
            TimeManager.ShortPause();
        }
Exemplo n.º 2
0
        public void MarkWidgetRead05(ShareDashboardData input)
        {
            //Click on a Hierarchy node that contains dashboard.
            var dashboard = input.InputData.DashboardInfo;

            HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName);
            TimeManager.LongPause();

            //Share dashboardA to userB successfully.
            HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName);
            JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(30);
            TimeManager.LongPause();

            HomePagePanel.ClickShareWidgetButton(dashboard[0].WidgetName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[0]);
            TimeManager.MediumPause();
            ShareWindow.ClickShareButton();
            TimeManager.LongPause();

            Assert.AreEqual(input.ExpectedData.messages[0], HomePagePanel.GetPopNotesValue());

            //Login with userB. Navigate to homepage to select the hierarchynodeA.
            HomePagePanel.ExitJazz();
            JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[0].LoginName, dashboard[0].Receivers[0].Password, dashboard[0].HierarchyName[0]);
            HomePagePanel.NavigateToAllDashboard();
            HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName);
            TimeManager.LongPause();

            //select shared dashboard
            HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName);
            JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(30);
            TimeManager.LongPause();

            //The widget display unread mark.
            Assert.IsTrue(HomePagePanel.IsShareWidgetUnread(dashboard[0].WidgetName));

            //Select the unread widgetA to rename.
            HomePagePanel.RenameWidgetOpen(dashboard[0].WidgetName);
            Widget.CancelModifyWidgetName();

            //The widget display unread mark.
            Assert.IsTrue(HomePagePanel.IsShareWidgetUnread(dashboard[0].WidgetName));

            //Select the unread widgetA to share.
            HomePagePanel.ClickShareWidgetButton(dashboard[0].WidgetName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);
            ShareWindow.ClickGiveupButton();
            TimeManager.MediumPause();

            //The widget display unread mark.
            Assert.IsTrue(HomePagePanel.IsShareWidgetUnread(dashboard[0].WidgetName));
        }
        public void ShareDashboardFailed01(ShareDashboardData input)
        {
            var dashboard = input.InputData.DashboardInfo;

            JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[0].LoginName, dashboard[0].Receivers[0].Password, dashboard[0].HierarchyName[0]);
            HomePagePanel.NavigateToAllDashboard();

            HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName);
            TimeManager.MediumPause();

            //Click "share dashboard" button
            HomePagePanel.ClickShareDashboardButton(dashboard[0].DashboardName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

            //There userC, B not display
            Assert.IsFalse(ShareWindow.IsShareUserExistedOnWindow(dashboard[0].ShareUsers[0]));
            Assert.IsFalse(ShareWindow.IsShareUserExistedOnWindow(dashboard[0].ShareUsers[1]));

            // "share" button is gary out and disabled
            Assert.IsFalse(ShareWindow.IsShareButtonEnable());

            ShareWindow.ClickGiveupButton();
            TimeManager.LongPause();
        }
        public void MarkDashboardRead05(ShareDashboardData input)
        {
            //Click on a Hierarchy node that contains dashboard.
            var dashboard = input.InputData.DashboardInfo;

            HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName);
            TimeManager.LongPause();

            //Share dashboardA to userB successfully.
            HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName);
            JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(30);
            TimeManager.LongPause();

            HomePagePanel.ClickShareDashboardButton(dashboard[0].DashboardName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[0]);
            TimeManager.MediumPause();
            ShareWindow.ClickShareButton();
            TimeManager.LongPause();

            Assert.AreEqual(input.ExpectedData.messages[0], HomePagePanel.GetPopNotesValue());

            HomePagePanel.ClickShareDashboardButton(dashboard[0].DashboardName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[0]);
            TimeManager.MediumPause();
            ShareWindow.ClickShareButton();
            TimeManager.LongPause();

            Assert.AreEqual(input.ExpectedData.messages[1], HomePagePanel.GetPopNotesValue());

            //Login with userB. Navigate to homepage to select the hierarchynodeA.
            HomePagePanel.ExitJazz();
            JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[0].LoginName, dashboard[0].Receivers[0].Password, dashboard[0].HierarchyName[0]);
            HomePagePanel.NavigateToAllDashboard();
            HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName);
            TimeManager.LongPause();
            Assert.IsTrue(HomePagePanel.IsShareDashboardUnread(dashboard[0].DashboardName));

            //Select the unread dashboard to rename.
            HomePagePanel.ClickRenameDashboardButton(dashboard[0].DashboardName);
            TimeManager.MediumPause();

            HomePagePanel.ClickRenameDashboardCancel();
            //The dashboard unread mark can't removed.
            Assert.IsTrue(HomePagePanel.IsShareDashboardUnread(dashboard[0].DashboardName));

            //Select the unread dashboard to delete
            HomePagePanel.ClickDeleteDashboardButton(dashboard[0].DashboardName);
            TimeManager.MediumPause();

            JazzMessageBox.MessageBox.GiveUp();
            //The dashboard unread mark can't removed.
            Assert.IsTrue(HomePagePanel.IsShareDashboardUnread(dashboard[0].DashboardName));

            //Click cancel or 'x' icon of rename.
            HomePagePanel.ClickRenameDashboardCancel();
            TimeManager.ShortPause();

            //Select the unread dashboard to share
            HomePagePanel.ClickShareDashboardButton(dashboard[0].DashboardName);
            TimeManager.MediumPause();
            ShareWindow.ClickGiveupButton();

            //The dashboard unread mark can't removed.
            Assert.IsTrue(HomePagePanel.IsShareDashboardUnread(dashboard[0].DashboardName));

            //Select the unread dashboard to add to favorite.
            HomePagePanel.ClickFavoriteDashboardButton(dashboard[0].DashboardName);
            TimeManager.LongPause();

            //The dashboard unread mark can't removed
            Assert.IsTrue(HomePagePanel.IsShareDashboardUnread(dashboard[0].DashboardName));

            //The dashboard in favorite don't show unread mark
            HomePagePanel.NavigateToMyFavorite();
            TimeManager.LongPause();
            Assert.IsFalse(HomePagePanel.IsShareDashboardUnread(dashboard[0].DashboardName));
        }