Beispiel #1
0
        public void ShareWidgetFailed01(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();

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

            //Click "share Widget" button
            HomePagePanel.ClickShareWidgetButton(dashboard[0].WidgetName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

            //There isn't any users(UserC and UserB) 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());

            //Close share window
            ShareWindow.Close();
        }
Beispiel #2
0
        public void VerifyCancelAndCloseWhenInviteOtherUsers(ShareDashboardData input)
        {
            var dashboard = input.InputData.DashboardInfo;

            //Login to Jazz with UserA. Navigate to homepage->Dashboard->Collaborative Widget  tab.
            JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[0].LoginName, dashboard[0].Receivers[0].Password, null);
            HomePagePanel.NavigateToMyShare();

            //Click "Subscriber User List"  button in widgetA.
            HomePagePanel.ClickShareMyShareWidgetButton(dashboard[0].WidgetName);
            TimeManager.ShortPause();

            //.UserA,UserB,UserC appear in Subscriber User List.
            Assert.IsTrue(ShareWindow.IsEnjoyUserInSubscribeUserList(dashboard[0].ShareUsers[0]));
            Assert.IsTrue(ShareWindow.IsEnjoyUserInSubscribeUserList(dashboard[0].ShareUsers[1]));
            Assert.IsTrue(ShareWindow.IsEnjoyUserInSubscribeUserList(dashboard[0].ShareUsers[2]));

            //Click "Invitation" button, Check UserD in the left panel.
            ShareWindow.ClickInviteOtherButton();
            TimeManager.ShortPause();
            ShareWindow.CheckEnjoyUser(dashboard[0].ShareUsers[3]);

            //UserD appear in SharetoUser list in the right panel.
            Assert.IsTrue(ShareWindow.IsEnjoyUserInSendedList(dashboard[0].ShareUsers[3]));

            //Click Cancel button.then close share user list window
            ShareWindow.ClickGiveUpEnjoyButton();
            TimeManager.ShortPause();

            //Click "Subscriber User List"  button in widgetA.
            HomePagePanel.ClickShareMyShareWidgetButton(dashboard[0].WidgetName);
            TimeManager.ShortPause();

            //Click "Invitation" button, Check UserD in the left panel.
            ShareWindow.ClickInviteOtherButton();
            TimeManager.ShortPause();
            ShareWindow.CheckEnjoyUser(dashboard[0].ShareUsers[3]);

            ShareWindow.Close();
            TimeManager.ShortPause();

            //Login to Jazz with UserA. Navigate to homepage->Dashboard->Collaborative Widget  tab.
            //Only one widgetA keep display in thumbnail list of UserA . The new widgetA doesn't display in UserA.
            Assert.AreEqual(1, HomePagePanel.GetSameWidgetNameNumberofMyShare(dashboard[0].WidgetName));

            //Login to Jazz with UserB. Navigate to homepage->Dashboard->Collaborative Widget  tab.
            HomePagePanel.ExitJazz();
            JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[1].LoginName, dashboard[0].Receivers[1].Password, null);
            HomePagePanel.NavigateToMyShare();

            //.Only one widgetA keep display in thumbnail list of UserB.The new widgetA doesn't display in UserB.
            Assert.AreEqual(1, HomePagePanel.GetSameWidgetNameNumberofMyShare(dashboard[0].WidgetName));
        }
 public void TearDown()
 {
     if (Directory.Exists(outputFolder))
     {
         Directory.Delete(outputFolder, true);
     }
     shareWindow.Close();
 }
        public void ShareDashboardFailed04(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 is UserE/D display
            Assert.IsFalse(ShareWindow.IsShareUserExistedOnWindow(dashboard[0].ShareUsers[0]));
            Assert.IsFalse(ShareWindow.IsShareUserExistedOnWindow(dashboard[0].ShareUsers[1]));
            Assert.IsTrue(ShareWindow.IsShareUserExistedOnWindow(dashboard[0].ShareUsers[2]));
            Assert.IsTrue(ShareWindow.IsShareUserExistedOnWindow(dashboard[0].ShareUsers[3]));

            //Check UserE checkbox and click "share" directly.
            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[3]);
            TimeManager.ShortPause();

            ShareWindow.ClickShareButton();
            JazzMessageBox.LoadingMask.WaitPopNotesAppear(5);

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

            //Delete a dashboard from UserE(Not delete dashboardA).Click "share" again.
            HomePagePanel.ExitJazz();
            JazzFunction.LoginPage.LoginWithOption(dashboard[1].Receivers[0].LoginName, dashboard[1].Receivers[0].Password, dashboard[1].HierarchyName[0]);
            HomePagePanel.NavigateToAllDashboard();
            HomePagePanel.SelectHierarchyNode(dashboard[1].HierarchyName);
            TimeManager.LongPause();

            HomePagePanel.ClickDeleteDashboardButton(dashboard[1].DashboardName);
            TimeManager.ShortPause();
            JazzMessageBox.MessageBox.Delete();
            TimeManager.LongPause();

            //Share dashboard successfully UserE again
            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();

            //Check UserE checkbox and click "share" directly.
            HomePagePanel.ClickShareDashboardButton(dashboard[0].DashboardName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[3]);
            TimeManager.ShortPause();

            ShareWindow.ClickShareButton();
            JazzMessageBox.LoadingMask.WaitPopNotesAppear(5);

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

            //Click "Cancel" button in share dashboard window.
            HomePagePanel.ClickShareDashboardButton(dashboard[0].DashboardName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);
            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[3]);
            TimeManager.ShortPause();

            ShareWindow.ClickGiveupButton();
            TimeManager.ShortPause();

            //Click "Close" button in share dashboard window.
            HomePagePanel.ClickShareDashboardButton(dashboard[0].DashboardName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);
            ShareWindow.CheckShareUser(dashboard[0].ShareUsers[3]);
            TimeManager.ShortPause();

            ShareWindow.Close();
            TimeManager.ShortPause();

            //UserE dashboard include dashboardA and dashboardA+timestamp.
            HomePagePanel.ExitJazz();
            JazzFunction.LoginPage.LoginWithOption(dashboard[1].Receivers[0].LoginName, dashboard[1].Receivers[0].Password, dashboard[1].HierarchyName[0]);
            HomePagePanel.NavigateToAllDashboard();
            HomePagePanel.SelectHierarchyNode(dashboard[1].HierarchyName);
            TimeManager.LongPause();

            //Not easy to confirm the position, so just judge the shared dashboards are existed
            //string newName = dashboard[0].DashboardName + "_" + HomePagePanel.GetShareCurrentTime();
            Assert.IsTrue(HomePagePanel.IsDashboardButtonExisted(dashboard[0].DashboardName));
        }