public async Task ClickLoginOnLoginPage() { // legitimize action if (ModalState != ModalState.Login) { throw new Exception("Can't ClickLogin if not on Login page"); } ModalState = ModalState.Empty; ModalCount--; switch (NavState) { case NavState.OnMainPage: await ExpectedMainPage.OnAppearingAsync(); break; case NavState.OnUomsPage: await ExpectedUomsCollectionPage.OnReappearingAsync(); break; case NavState.OnUomItemPage: await ExpectedUomItemPage.OnAppearingAsync(); break; case NavState.Empty: break; default: break; } }
public async Task ClickEditOnUomsPageToolbar() { // legitimize action if (NavState != NavState.OnUomsPage) { throw new Exception("Can't ClickEditOnUomsPageToolbar() if not on Uoms page"); } ExpectedUomsCollectionPage.ClickEditOnToolbar(); }
public async Task ClickPageBackOnUomsPage() { // legitimize action if (NavState != NavState.OnUomsPage) { throw new Exception("Can't ClickNextPageOnUomsPage() if not on Uoms page"); } if (!CheckForRelogin()) { await ExpectedUomsCollectionPage.PageBackTappedAsync(); } }
public async Task SelectUomItemToDelete(int index) { // legitimize action if (NavState != NavState.OnUomsPage) { throw new Exception("Can't SelectUomItemToDelete() if not on Uoms page"); } ; if (!CheckForRelogin()) { await ExpectedUomsCollectionPage.DeleteAsync(index); } }
public async Task SearchOnUomsPage(string searchText) { // legitimize action if (NavState != NavState.OnUomsPage) { throw new Exception("Can't SearchOnUomsPage() if not on Uoms page"); } ExpectedUomsCollectionPage.SetSearchText(searchText); if (!CheckForRelogin()) { await ExpectedUomsCollectionPage.Search(); } }
public async Task ClickSaveOnUomItemPage() { // legitimize action if (NavState != NavState.OnUomItemPage) { throw new Exception("Can't ClickSaveOnUomItemPage() if not on Uom Item page"); } await ExpectedUomItemPage.Save(); NavState = NavState.OnUomsPage; NavCount--; if (!CheckForRelogin()) { await ExpectedUomsCollectionPage.OnReappearingAsync(); } }
public async Task ClickUomsOnMainPage() { // legitimize action if (NavState != NavState.OnMainPage) { throw new Exception("Can't ClickUomsOnMainPage() if not on Main page"); } ExpectedUomsCollectionPage = GetNewExpectedUomsPage(); NavState = NavState.OnUomsPage; NavCount++; ExpectedUomsCollectionPage.ClickEditOnToolbar(); if (!CheckForRelogin()) { await ExpectedUomsCollectionPage.OnAppearingAsync(); } }
public async Task SelectUomItemToEdit(int index) { // legitimize action if (NavState != NavState.OnUomsPage) { throw new Exception("Can't SelectUomItemToEdit() if not on Uoms page"); } var selectedListItemId = ExpectedUomsCollectionPage.Select(index).Id; ExpectedUomItemPage = GetNewExpectedUomItemPage(); ExpectedUomItemPage.SetUomId(selectedListItemId); ExpectedUomItemPage.SetItemIsBeingEdited(true); NavState = NavState.OnUomItemPage; NavCount++; if (!CheckForRelogin()) { await ExpectedUomItemPage.OnAppearingAsync(); } }