Skip to content

Commit 32e7af6

Browse files
committed
updates method for second button links conversations
updates method for second button links conversations
1 parent 13036a1 commit 32e7af6

File tree

7 files changed

+19
-6
lines changed

7 files changed

+19
-6
lines changed

CheckLinks.cs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
using Microsoft.VisualStudio.TestTools.UnitTesting;
22
using OpenQA.Selenium;
3+
using OpenQA.Selenium.Support.UI;
4+
using System;
35

46
namespace UnitTestProject1
57
{
68

79

810
public class CheckLinks
911
{
10-
[TestInitialize]
12+
13+
14+
[TestInitialize]
1115
public void init()
1216
{
1317
Driver.Initialize();
@@ -19,14 +23,22 @@ public static void CheckBasicLinks()
1923

2024
Assert.AreEqual(followed.Text, "Followed Sites");
2125

22-
23-
24-
26+
}
27+
[TestMethod]
28+
public static void CheckConvo()
29+
{
30+
Driver.Instance.FindElement(By.LinkText("Conversations")).Click();
31+
var convo = Driver.Instance.FindElement(By.CssSelector(".empty-content__action")).Displayed;
32+
//Driver.Instance.Navigate().GoToUrl("https://wordpress.com/read/conversations");
33+
//WebDriverWait wait = new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(2));
34+
//wait.Until(d => d.SwitchTo().ActiveElement().GetAttribute("CssSelector") == ".empty-content__action");
35+
Assert.AreEqual(true,convo );
2536
}
37+
2638
[TestCleanup]
2739
public void Cleanup()
2840
{
29-
// Driver.Close();
41+
Driver.Close();
3042
}
3143
}
3244
}

NewPostPage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static void GoToNewPost()
4242
public class CreatePostCommand
4343
{
4444
public string title;
45-
private string body;
45+
// private string body;
4646

4747
public CreatePostCommand(string title)
4848
{

UnitTest1.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public void CheckTags()
2626
LoginPage.GoTo();
2727
LoginPage.LoginAs("scopethesound").WithPassword("niplifeow").Login();
2828
CheckLinks.CheckBasicLinks();
29+
CheckLinks.CheckConvo();
2930

3031
}
3132
[TestCleanup]

bin/Debug/UnitTestProject1.dll

512 Bytes
Binary file not shown.

bin/Debug/UnitTestProject1.pdb

0 Bytes
Binary file not shown.

obj/Debug/UnitTestProject1.dll

512 Bytes
Binary file not shown.

obj/Debug/UnitTestProject1.pdb

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)