Exemple #1
0
        public void VerifySponsorCanInviteOtherUsers(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 appear in the subscriber user list.
            Assert.IsTrue(ShareWindow.IsEnjoyUserInSubscribeUserList(dashboard[0].ShareUsers[0]));
            Assert.IsTrue(ShareWindow.IsEnjoyUserInSubscribeUserList(dashboard[0].ShareUsers[1]));

            //Click "Invitation" button, check UserC and UserD add the new annotation and then click Confirm button.
            ShareWindow.ClickInviteOtherButton();
            TimeManager.ShortPause();
            ShareWindow.CheckEnjoyUser(dashboard[0].ShareUsers[2]);
            ShareWindow.CheckEnjoyUser(dashboard[0].ShareUsers[3]);

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

            ShareWindow.ClickEnjoyButton();
            TimeManager.ShortPause();

            //Login to Jazz with UserC.Navigate to homepage, then to "Collaborative Widget " tab.
            HomePagePanel.ExitJazz();
            JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[2].LoginName, dashboard[0].Receivers[2].Password, dashboard[0].HierarchyName[0]);
            HomePagePanel.NavigateToMyShare();

            //There is a widgetA appear in "Collaborative Widget " with the new annotation.
            Assert.IsTrue(HomePagePanel.IsWidgetExistedOnMyShare(dashboard[0].WidgetName));

            //Login to Jazz with UserD.Navigate to homepage, then to "Collaborative Widget " tab.
            HomePagePanel.ExitJazz();
            JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[3].LoginName, dashboard[0].Receivers[3].Password, dashboard[0].HierarchyName[0]);
            HomePagePanel.NavigateToMyShare();

            //There is a widgetA appear in "Collaborative Widget " with the new annotation.
            Assert.IsTrue(HomePagePanel.IsWidgetExistedOnMyShare(dashboard[0].WidgetName));
        }
        public void VerifyCancelAndCloseWhenShareCollaborativeWidget(ShareDashboardData input)
        {
            var dashboard = input.InputData.DashboardInfo;

            //Login to Jazz with UserA. Navigate to homepage, then to hierarchynodeA. Click the dashboardA name from dashboard list.
            JazzFunction.LoginPage.LoginWithOption(dashboard[0].Receivers[0].LoginName, dashboard[0].Receivers[0].Password, null);
            HomePagePanel.NavigateToAllDashboard();

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

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

            //Select widgetA and click "Share link" button.
            HomePagePanel.ClickEnjoyWidgetButton(dashboard[0].WidgetName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

            //check UserB in the left panel.
            ShareWindow.CheckEnjoyUser(dashboard[0].ShareUsers[0]);
            TimeManager.ShortPause();

            //Mouse over the UserB in the right panel.Click Close button or Uncheck the checkbox for UserB.
            ShareWindow.ClickRemoveEnjoyUserButton(dashboard[0].ShareUsers[0]);
            TimeManager.ShortPause();

            //UserB disappears in SharetoUser list in the right panel.
            Assert.IsFalse(ShareWindow.IsEnjoyUserInSendedList(dashboard[0].ShareUsers[0]));

            //Check UserB and UserC in left panel and then click "Cancel" button.
            ShareWindow.CheckEnjoyUser(dashboard[0].ShareUsers[0]);
            ShareWindow.CheckEnjoyUser(dashboard[0].ShareUsers[1]);
            TimeManager.ShortPause();

            ShareWindow.ClickGiveUpEnjoyButton();
            TimeManager.ShortPause();

            //WidgetA cannot appear in UserA,UserB and UserC's Collaborative Widget  tab page
            HomePagePanel.NavigateToMyShare();
            Assert.IsFalse(HomePagePanel.IsWidgetExistedOnMyShare(dashboard[0].WidgetName));
            TimeManager.ShortPause();

            //Navigate to homepage, then to hierarchynodeA. Click the dashboardA name from dashboard list.
            HomePagePanel.NavigateToAllDashboard();

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

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

            //Select widgetA, click "Share link" button and check UserB in left panel.
            HomePagePanel.ClickEnjoyWidgetButton(dashboard[0].WidgetName);
            TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME);

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

            ShareWindow.ClickGiveUpEnjoyButton();
            TimeManager.ShortPause();

            //WidgetA cannot appear in UserA,UserB and UserC's Collaborative Widget  tab page
            HomePagePanel.NavigateToMyShare();
            Assert.IsFalse(HomePagePanel.IsWidgetExistedOnMyShare(dashboard[0].WidgetName));
            TimeManager.ShortPause();
        }