Пример #1
0
        public void VerifyUnsubscriberOneUserCanBeAddAgain(ShareDashboardData input)
        {
            var dashboard = input.InputData.DashboardInfo;

            //Login to Jazz with UserA. Navigate to homepage->Dashboard->Widget Mirror 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 and UserD 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]));
            Assert.IsTrue(ShareWindow.IsEnjoyUserInSubscribeUserList(dashboard[0].ShareUsers[3]));

            //Mouse over the UserB and UserD, Click RemoveSubscriber button.
            ShareWindow.FocusOnSubscriberUser(dashboard[0].ShareUsers[1]);
            ShareWindow.ClickRemoveorQuitSubcriberButton(dashboard[0].ShareUsers[1]);
            TimeManager.ShortPause();
            ShareWindow.FocusOnSubscriberUser(dashboard[0].ShareUsers[3]);
            ShareWindow.ClickRemoveorQuitSubcriberButton(dashboard[0].ShareUsers[3]);
            TimeManager.ShortPause();

            //Click Close button.
            ShareWindow.CloseSubcriberListWindow();
            TimeManager.ShortPause();

            //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();

            //WidgetA is disappear in thumbnail list of UserB.
            Assert.IsFalse(HomePagePanel.IsWidgetExistedOnMyShare(dashboard[0].WidgetName));

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

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

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

            //Click "Invitation" button.UserB and UserD become available in left panel.
            ShareWindow.ClickInviteOtherButton();
            TimeManager.ShortPause();
            Assert.IsTrue(ShareWindow.IsEnjoyUserInShareList(dashboard[0].ShareUsers[1]));
            Assert.IsTrue(ShareWindow.IsEnjoyUserInShareList(dashboard[0].ShareUsers[3]));

            //Check UserB, and then click Confirm button
            ShareWindow.CheckEnjoyUser(dashboard[0].ShareUsers[1]);
            TimeManager.ShortPause();

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

            //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();

            //WidgetA is display in thumbnail list of UserB.
            Assert.IsTrue(HomePagePanel.IsWidgetExistedOnMyShare(dashboard[0].WidgetName));
        }