public void ChainFlowsAndExe()
        {
            string     parentFlow  = "Parent";
            string     nestedFlow1 = "Nested1";
            Permission permission  = new Permission(true, true, true, true);

            ConsoleMessage.StartTest("Flow Object: Chain and Exe", "FlowObject");
            Appium.Instance.Driver.LaunchApp();
            LoginActivity.LoginStep(_user1, _timeout);
            BrowserActivity.CreateAssay(_assay);
            //setup parent
            BrowserActivity.CreateFlow(parentFlow);
            BrowserActivity.FlowList.FindAndTap(parentFlow);
            FlowActivity.AddElement("Add");
            FlowActivity.AddElement("Flow");
            FlowActivity.ElementList.VerifyElementCountByClass(2, "android.widget.EditText");
            TabMenu.Browser.Tap();
            //setup nested1
            BrowserActivity.AssayList.FindAndTap(_assay);
            BrowserActivity.CreateFlow(nestedFlow1);
            BrowserActivity.FlowList.FindAndTap(nestedFlow1);
            FlowActivity.AddElement("Add");
            FlowActivity.ElementList.VerifyElementCountByClass(1, "android.widget.EditText");
            TabMenu.Browser.Tap();

            //link parent and nested1
            BrowserActivity.AssayList.FindAndTap(_assay);
            BrowserActivity.FlowList.FindAndTap(parentFlow);
            FlowActivity.ElementList.FindAndTap("Flow");
            FlowElementDialog.SelectFlow.Tap();
            FlowSelectNesting.ItemList.FindAndTap(_assay);
            FlowSelectNesting.ItemList.FindAndTap(nestedFlow1);
            FlowElementDialog.Ok.Tap();
            FlowActivity.ElementList.FindAndTap(nestedFlow1);
            FlowElementDialog.ShowNested.Tap();
            FlowActivity.FlowName.VerifyText(nestedFlow1);
            FlowActivity.NavPanel(NavPanel.Parent);
            //share
            FlowActivity.Share.Tap();
            FlowActivity.ShareOk.Tap();
            FlowShareNestedDialog.Yes.Tap();
            FlowShareDialog.ShareWithUserStep(_team, _user2.Name, permission);
            CommonOperation.Delay(_shareDelay);
            TabMenu.Logout.Tap();

            //check shared flow on recipient
            LoginActivity.LoginStep(_user2, _timeout);
            CommonOperation.Delay(_loginDelay);
            BrowserActivity.AssayList.FindAndTap("Shared With: " + _user1.Name);
            BrowserActivity.FlowList.FindAndTap(_assay);
            BrowserActivity.FlowList.FindAndTap(parentFlow);
            FlowActivity.ElementList.VerifyElementCountByClass(2, "android.widget.EditText");
            FlowActivity.ElementList.FindAndTap(nestedFlow1);
            FlowElementDialog.ShowNested.Tap();
            FlowActivity.FlowName.VerifyText(nestedFlow1);
        }
Esempio n. 2
0
        public void ChangeNestedTest()
        {
            string parentFlow  = "Parent";
            string nestedFlow1 = "Nested1";
            string nestedFlow2 = "Nested2";

            ConsoleMessage.StartTest("Flow Object: Change Nested", "FlowObject");
            Appium.Instance.Driver.LaunchApp();
            LoginActivity.LoginStep(_user, _timeout);
            BrowserActivity.CreateAssay(_assay);
            //setup parent
            BrowserActivity.CreateFlow(parentFlow);
            BrowserActivity.FlowList.FindAndTap(parentFlow);
            FlowActivity.AddElement("Add");
            FlowActivity.AddElement("Flow");
            FlowActivity.ElementList.VerifyElementCountByClass(2, "android.widget.EditText");
            TabMenu.Browser.Tap();
            //setup nested1
            BrowserActivity.AssayList.FindAndTap(_assay);
            BrowserActivity.CreateFlow(nestedFlow1);
            BrowserActivity.FlowList.FindAndTap(nestedFlow1);
            FlowActivity.AddElement("Add");
            FlowActivity.ElementList.VerifyElementCountByClass(1, "android.widget.EditText");
            TabMenu.Browser.Tap();
            //setup nested2
            BrowserActivity.AssayList.FindAndTap(_assay);
            BrowserActivity.CreateFlow(nestedFlow2);
            BrowserActivity.FlowList.FindAndTap(nestedFlow2);
            FlowActivity.AddElement("Aspirate");
            FlowActivity.ElementList.VerifyElementCountByClass(1, "android.widget.EditText");
            TabMenu.Browser.Tap();

            //link parent and nested1
            BrowserActivity.AssayList.FindAndTap(_assay);
            BrowserActivity.FlowList.FindAndTap(parentFlow);
            FlowActivity.ElementList.FindAndTap("Flow");
            FlowElementDialog.SelectFlow.Tap();
            FlowSelectNesting.ItemList.FindAndTap(_assay);
            FlowSelectNesting.ItemList.FindAndTap(nestedFlow1);
            FlowElementDialog.Ok.Tap();
            FlowActivity.ElementList.FindAndTap(nestedFlow1);
            FlowElementDialog.ShowNested.Tap();
            FlowActivity.FlowName.VerifyText(nestedFlow1);
            FlowActivity.NavPanel(NavPanel.Parent);
            //change nested
            FlowActivity.ElementList.FindAndTap(nestedFlow1);
            FlowElementDialog.SelectFlow.Tap();
            FlowSelectNesting.ItemList.FindAndTap(_assay);
            FlowSelectNesting.ItemList.FindAndTap(nestedFlow2);
            FlowElementDialog.Ok.Tap();
            FlowActivity.ElementList.FindAndTap(nestedFlow2);
            FlowElementDialog.ShowNested.Tap();
            FlowActivity.FlowName.VerifyText(nestedFlow2);
            TabMenu.Logout.Tap();
        }
        public void ChainFlowsAndExe()
        {
            string parentFlow  = "Parent";
            string nestedFlow1 = "Nested1";
            string nestedFlow2 = "Nested2";

            ConsoleMessage.StartTest("Flow Object: Chain and Exe", "FlowObject");
            Appium.Instance.Driver.LaunchApp();
            LoginActivity.LoginStep(_user, _timeout);
            BrowserActivity.CreateAssay(_assay);
            //setup parent
            BrowserActivity.CreateFlow(parentFlow);
            BrowserActivity.FlowList.FindAndTap(parentFlow);
            FlowActivity.AddElement("Add");
            FlowActivity.AddElement("Aspirate");
            FlowActivity.AddElement("Flow");
            FlowActivity.ElementList.VerifyElementCountByClass(3, "android.widget.EditText");
            TabMenu.Browser.Tap();

            //setup nested1
            BrowserActivity.CreateFlow(nestedFlow1);
            BrowserActivity.FlowList.FindAndTap(nestedFlow1);
            FlowActivity.AddElement("Add");
            FlowActivity.AddElement("Flow");
            FlowActivity.ElementList.VerifyElementCountByClass(2, "android.widget.EditText");
            TabMenu.Browser.Tap();

            //setup nested2
            BrowserActivity.CreateFlow(nestedFlow2);
            BrowserActivity.FlowList.FindAndTap(nestedFlow2);
            FlowActivity.AddElement("Aspirate");
            FlowActivity.ElementList.VerifyElementCountByClass(1, "android.widget.EditText");
            TabMenu.Browser.Tap();

            //link parent and nested1
            BrowserActivity.AssayList.FindAndTap(_assay);
            BrowserActivity.FlowList.FindAndTap(parentFlow);
            FlowActivity.ElementList.FindAndTap("Flow");
            FlowElementDialog.SelectFlow.Tap();
            FlowSelectNesting.ItemList.FindAndTap(_assay);
            FlowSelectNesting.ItemList.FindAndTap(nestedFlow1);
            FlowElementDialog.Ok.Tap();
            FlowActivity.ElementList.FindAndTap(nestedFlow1);
            FlowElementDialog.ShowNested.Tap();


            //link nested1 and nested2
            FlowActivity.ElementList.FindAndTap("Flow");
            FlowElementDialog.SelectFlow.Tap();
            FlowSelectNesting.ItemList.FindAndTap(_assay);
            FlowSelectNesting.ItemList.FindAndTap(nestedFlow2);
            FlowElementDialog.Ok.Tap();
            FlowActivity.ElementList.FindAndTap(nestedFlow2);
            FlowElementDialog.ShowNested.Tap();
            CommonOperation.Delay(1);

            //move to parent and start flow
            FlowActivity.NavPanel(NavPanel.Parent);
            FlowActivity.Start.Tap();
            FlowStartDialog.Ok.Tap();
            FlowSelectAssayDialog.AssayList.FindAndTap(_preExeAssay);
            CommonOperation.Delay(2);
            FlowActivity.OpenElement(0);
            FlowElementDialog.Done.Tap();
            FlowActivity.OpenElement(1);
            FlowElementDialog.Done.Tap();
            FlowActivity.OpenElement(2);
            FlowElementDialog.ShowNested.Tap();

            //exe nested1
            FlowActivity.Start.Tap();
            FlowStartDialog.Ok.Tap();
            FlowActivity.OpenElement(0);
            FlowElementDialog.Done.Tap();
            FlowActivity.OpenElement(1);
            FlowElementDialog.ShowNested.Tap();

            //exe nested2
            FlowActivity.Start.Tap();
            FlowStartDialog.Ok.Tap();
            FlowActivity.OpenElement(0);
            FlowElementDialog.Done.Tap();
            //sign nested2
            FlowSignActivity.SignSignature.Tap();
            SignDialog.Ok.Tap();
            FlowSignActivity.Ok.Tap();

            //move to nested1 and finish
            FlowActivity.NavPanel(NavPanel.Nested1);
            FlowActivity.OpenElement(1);
            FlowElementDialog.Done.Tap();
            //sign nested1
            FlowSignActivity.SignSignature.Tap();
            SignDialog.Ok.Tap();
            FlowSignActivity.Ok.Tap();

            //move to parent and finish
            FlowActivity.NavPanel(NavPanel.Parent);
            FlowActivity.OpenElement(2);
            FlowElementDialog.Done.Tap();
            //sign parent
            FlowSignActivity.SignSignature.Tap();
            SignDialog.Ok.Tap();
            FlowSignActivity.Ok.Tap();
        }