public void Fill(CreateDiscussionPage createDiscussionPage) { createDiscussionPage.Title = Guid.NewGuid().ToString(); createDiscussionPage.SelectCategory(_testDefaults.ExampleCategory); createDiscussionPage.Body = _body; createDiscussionPage.CreateDiscussion(); }
public Discussion CreateDiscussion(Discussion.DiscussionBuilder builder) { var newDiscussionButton = WebDriver.FindElement(By.ClassName("createtopicbutton")); newDiscussionButton.Click(); var createDisucssionPage = new CreateDiscussionPage(WebDriver); builder.Fill(createDisucssionPage); createDisucssionPage.CreateDiscussion(); return(new Discussion(WebDriver)); }
public void DiscussionDetailsAreDisplayedAfterCreation() { LoggedInUserShell shell = Login(); CreateDiscussionPage createDiscussionPage = shell.ClickNewDiscussionButton(); string title = "Dicussion Title by DummyUserName"; string category = "Example Category"; string description = "This is my first discussion"; createDiscussionPage.Title = title; createDiscussionPage.Category = category; createDiscussionPage.Description = description; DiscussionPage discussionPage = createDiscussionPage.ClickCreateDiscussion(); Assert.AreEqual(title, discussionPage.Title); Assert.AreEqual(category, discussionPage.Category); Assert.AreEqual(description, discussionPage.Description); }