public void GlobalTestSetup()
        {
            _teamName    = Settings.Instance.Team;
            _initTimeout = Settings.Instance.InitTimeout;
            _timeout     = Settings.Instance.LoginTimeout;
            ExcelReport excel =
                new ExcelReport(TestContext.CurrentContext.TestDirectory + "\\" + Settings.Instance.Version + "-outPut");

            try
            {
                //init login
                ConsoleMessage.StartTest("Global Setup", "GlobalSetup");
                Appium.Instance.Driver.LaunchApp();
                LoginActivity.LoginStep(Settings.Instance.User1, _initTimeout);
                TabMenu.Logout.Tap();
                LoginActivity.LoginStep(Settings.Instance.User2, _initTimeout);
                TabMenu.Logout.Tap();
                LoginActivity.LoginStep(Settings.Instance.User3, _initTimeout);
                TabMenu.Logout.Tap();
                LoginActivity.LoginStep(Settings.Instance.User4, _initTimeout);
                TabMenu.Logout.Tap();
            }
            finally
            {
                Appium.Instance.Driver.CloseApp();
                ConsoleMessage.EndTest();
            }
        }
        public void BeforeClass()
        {
            _user1      = Settings.Instance.User1;
            _user2      = Settings.Instance.User2;
            _timeout    = Settings.Instance.LoginTimeout;
            _shareDelay = Settings.Instance.ShareDelay;
            _loginDelay = Settings.Instance.LoginDelay;
            _version    = Settings.Instance.Version;
            _assay      = string.Format("{0}-ShareAssayWithUser", _version);
            _flow       = string.Format("{0}-ShareAssayWithUser", _version);
            _team       = String.Format("!{0}-ShareAssay", _version);

            ConsoleMessage.StartTest("Share assay with user: Setup", "ShareAssay");
            try
            {
                Appium.Instance.Driver.LaunchApp();
                LoginActivity.LoginStep(_user1, _timeout);
                TabMenu.Teams.Tap();
                TeamActivity.NewTeam.Tap();
                TeamCreateDialog.TeamName.EnterText(_team);
                TeamCreateDialog.Create.Tap();
                TeamActivity.TeamMemberList.VerifyElementCountById(1, "user_picture");
                //add user to team
                TeamActivity.AddUserToTeam(_user2.Name);
                TeamActivity.TeamMemberList.VerifyElementCountById(2, "user_picture");
                CommonOperation.Delay(5);
                TabMenu.Logout.Tap();
            }
            finally
            {
                Appium.Instance.Driver.CloseApp();
                ConsoleMessage.EndTest();
            }
        }
        public void AfterClass()
        {
            try
            {
                ConsoleMessage.StartTest("Share flow with user: Clean up", "ShareFlow");
                Appium.Instance.Driver.LaunchApp();
                LoginActivity.LoginStep(_user1, _timeout);
                BrowserActivity.AssayList.FindAndTap(_assay);
                BrowserActivity.DeleteAllFlows();
                BrowserActivity.DeleteAssay.Tap();
                AssayDeleteDialog.Delete.Tap();
                //delete team
                TabMenu.Teams.Tap();
                TeamActivity.TeamList.FindAndTap(_team);
                TeamActivity.Dismiss.Tap();
                TeamDeleteDialog.Delete.Tap();
                CommonOperation.Delay(5);
                TabMenu.Logout.Tap();

                LoginActivity.LoginStep(_user2, _timeout);
                BrowserActivity.AssayList.FindAndTap(_assayRec);
                BrowserActivity.DeleteAllFlows();
                BrowserActivity.DeleteAssay.Tap();
                AssayDeleteDialog.Delete.Tap();
            }
            finally
            {
                Appium.Instance.Driver.CloseApp();
                ConsoleMessage.EndTest();
            }
        }
Пример #4
0
        public void BeforeClass()
        {
            _user1      = Settings.Instance.User1;
            _user2      = Settings.Instance.User2;
            _user3      = Settings.Instance.User3;
            _timeout    = Settings.Instance.LoginTimeout;
            _shareDelay = Settings.Instance.ShareDelay;
            _loginDelay = Settings.Instance.LoginDelay;
            _version    = Settings.Instance.Version;
            _assay      = string.Format("{0}-ShareFlowAndRemoveUserFromTeam", _version);
            _flow       = string.Format("{0}-ShareFlowAndRemoveUserFromTeam", _version);
            _team       = String.Format("!{0}-Flow{1}", _version, Settings.Instance.TeamRemove);



            ConsoleMessage.StartTest("Share flow with team and remove user from team: Setup", "ShareFlow");
            try
            {
                Appium.Instance.Driver.LaunchApp();
                LoginActivity.LoginStep(_user1, _timeout);
                BrowserActivity.CreateAssay(_assay);
                BrowserActivity.CreateFlow(_flow);
                BrowserActivity.FlowList.FindAndTap(_flow);
                FlowActivity.AddElement(element1);
                FlowActivity.AddElement(element2);
                FlowActivity.AddElement(element3);
                FlowActivity.ElementList.VerifyElementCountByClass(3, "android.widget.EditText");
                //create team
                TabMenu.Teams.Tap();
                CommonOperation.Delay(1);
                TeamActivity.NewTeam.Tap();
                TeamCreateDialog.TeamName.EnterText(_team);
                TeamCreateDialog.Create.Tap();
                TeamActivity.TeamMemberList.VerifyElementCountById(1, "user_picture");
                //add user to team
                TeamActivity.AddUserToTeam(_user2.Name);
                TeamActivity.TeamMemberList.VerifyElementCountById(2, "user_picture");
                CommonOperation.Delay(5);
            }
            finally
            {
                Appium.Instance.Driver.CloseApp();
                ConsoleMessage.EndTest();
            }
        }
Пример #5
0
 public void AfterClass()
 {
     try
     {
         ConsoleMessage.StartTest("Jit Test: Clean up", "Jit");
         Appium.Instance.Driver.LaunchApp();
         LoginActivity.LoginStep(_user, _timeout);
         BrowserActivity.AssayList.FindAndTap(_assay);
         BrowserActivity.DeleteAllFlows();
         BrowserActivity.DeleteAssay.Tap();
         AssayDeleteDialog.Delete.Tap();
     }
     finally
     {
         Appium.Instance.Driver.CloseApp();
         ConsoleMessage.EndTest();
     }
 }
        public void BeforeClass()
        {
            _user1       = Settings.Instance.User1;
            _user2       = Settings.Instance.User2;
            _user3       = Settings.Instance.User3;
            _timeout     = Settings.Instance.LoginTimeout;
            _shareDelay  = Settings.Instance.ShareDelay;
            _loginDelay  = Settings.Instance.LoginDelay;
            _version     = Settings.Instance.Version;
            _team        = String.Format("!{0}-Lib{1}", _version, Settings.Instance.TeamRemove);
            _baseLibrary = String.Format("!{0}-UserRemoveBase", _version);
            _shareName   = String.Format("!{0}-UserRemove", _version);

            ConsoleMessage.StartTest("Share library with team and remove user from team: Setup", "ShareLibrary");
            try
            {
                Appium.Instance.Driver.LaunchApp();
                LoginActivity.LoginStep(_user1, _timeout);
                TabMenu.Library.Tap();
                LibraryActivity.CreateLibrary(_baseLibrary);
                LibraryActivity.AddElement.Tap();
                LibraryElementActivity.ElementName.ClearText();
                LibraryElementActivity.ElementName.EnterText(element1);
                LibraryElementActivity.Ok.Tap();
                LibraryActivity.ElementList.VerifyElementCountById(1, "library_document_icon");
                //create team
                TabMenu.Teams.Tap();
                CommonOperation.Delay(1);
                TeamActivity.NewTeam.Tap();
                TeamCreateDialog.TeamName.EnterText(_team);
                TeamCreateDialog.Create.Tap();
                TeamActivity.TeamMemberList.VerifyElementCountById(1, "user_picture");
                //add user to team
                TeamActivity.AddUserToTeam(_user2.Name);
                TeamActivity.TeamMemberList.VerifyElementCountById(2, "user_picture");
                CommonOperation.Delay(5);
            }
            finally
            {
                Appium.Instance.Driver.CloseApp();
                ConsoleMessage.EndTest();
            }
        }
 public void AfterClass()
 {
     //clean up after test
     try
     {
         ConsoleMessage.StartTest("Share library with team and remove user from team: Cleanup", "ShareLibrary");
         Appium.Instance.Driver.LaunchApp();
         LoginActivity.LoginStep(_user1, _timeout);
         TabMenu.Library.Tap();
         LibraryActivity.DeleteAllLibs();
         CommonOperation.Delay(3);
         //delete team
         TabMenu.Teams.Tap();
         TeamActivity.TeamList.FindAndTap(_team);
         TeamActivity.Dismiss.Tap();
         TeamDeleteDialog.Delete.Tap();
     }
     finally
     {
         Appium.Instance.Driver.CloseApp();
         ConsoleMessage.EndTest();
     }
 }
 public void Setup()
 {
     try
     {
         ConsoleMessage.StartTest("Flow Object: Chain and Exe: Setup", "FlowObject");
         Appium.Instance.Driver.LaunchApp();
         LoginActivity.LoginStep(_user1, _timeout);
         //create team
         TabMenu.Teams.Tap();
         TeamActivity.NewTeam.Tap();
         TeamCreateDialog.TeamName.EnterText(_team);
         TeamCreateDialog.Create.Tap();
         TeamActivity.TeamMemberList.VerifyElementCountById(1, "user_picture");
         TeamActivity.AddUserToTeam(_user2.Name);
         TeamActivity.TeamMemberList.VerifyElementCountById(2, "user_picture");
         CommonOperation.Delay(5);
         TabMenu.Logout.Tap();
     }
     finally
     {
         Appium.Instance.Driver.CloseApp();
         ConsoleMessage.EndTest();
     }
 }
 public void TearDown()
 {
     Appium.Instance.Driver.CloseApp();
     ConsoleMessage.EndTest();
 }