public void Events_01_EventsCalendar() { UiTest(() => { _eventsPage = _myProfilePage.NavigateToEventsPage(); Assert.That(_eventsPage.Calendar.Displayed); Assert.That(_eventsPage.Calendar.Enabled); _eventsPage.ClickFutureEvent(); Assert.That(_eventsPage.GetStartDate().Displayed); Assert.That(_eventsPage.GetStartDate().Text, Is.Not.Empty); _eventRegisterationPage = _eventsPage.ClickRegisterNow(); Assert.That(_eventRegisterationPage.RegisterYourDetailsTx.Displayed); driver.Navigate().Back(); _advancedSearchPage = _eventsPage.ClickAdvancedSearch(); Assert.That(_advancedSearchPage.SearchResultsTx.Displayed); driver.Navigate().Back(); Assert.That(_eventsPage.Calendar.Displayed); }); }
public void Events_04_RegisteredEvents() { UiTest(() => { string eventName; if (_myProfilePage.UpcomingEventsTx.Text.Contains("You are not currently registered to attend any events.")) { _eventsPage = _myProfilePage.ClickViewAllEventsBtn(); _eventsPage.ClickFutureEvent(); _eventRegisterationPage = _eventsPage.ClickRegisterNow(); _eventRegisterationPage.FillInRegistrationForm(); Assert.That(_eventRegisterationPage.ThankYouForRegisteringTx.Text, Is.EqualTo("Thank you for registering. You should receive an email shortly confirming this.")); eventName = _eventRegisterationPage.EventNameTx.Text; _eventRegisterationPage.NavigateToMyProfilePageWhenSignedIn(); Assert.That(_myProfilePage.EventHeadingTx.Text, Is.EqualTo(eventName)); _myProfilePage.ClickCancelRegistrationBtn(); } else { Assert.That(_myProfilePage.EventHeadingTx.Displayed); } }); }