public IEnumerator ShowPopupsOverEachOther() { yield return(LoadScene("PopupsModule.Tests.Playmode.MainScene")); var signalBus = SceneContainer.Resolve <SignalBus>(); popupsViewManager = SceneContainer.Resolve <IPopupsViewManager <PopupEntityBase> >(); signalBus.Subscribe <LoadPopupAssetRequest>(OnAssetShouldBeLoadedCallback); var containerWithPopups = GameObject.FindObjectOfType <TestPopupsContainer>(); cachedPopups = containerWithPopups.GetPopups(); for (int i = 0; i < cachedPopups.Count; i++) { var popupData = new PopupEntityWithId(cachedPopups[i].gameObject.name, PopupRuleKeys.ForceShowRule) { PopupData = null, }; popupsViewManager.Open(popupData, OnSuccess, OnFail); yield return(new WaitForSeconds(1f)); } yield return(new WaitForSeconds(3f)); while (popupsViewManager.CurrentOpenedPopup != null) { popupsViewManager.CurrentOpenedPopup.Hide(); yield return(new WaitForSeconds(1f)); } yield return(new WaitForSeconds(3)); // TODO: Add assertions here now that the scene has started // Or you can just uncomment to simply wait some time to make sure the scene plays without errors //yield return new WaitForSeconds(1.0f); // Note that you can use SceneContainer.Resolve to look up objects that you need for assertions }
public ShowWhenNoVisiblePopupRule(IPopupsViewManager <PopupEntityBase> viewManager) { this.viewManager = viewManager; }