Skip to content

Commit 62f3a0a

Browse files
committed
Updating contributor tests
1 parent b187829 commit 62f3a0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+128
-112
lines changed
-1.1 KB
Binary file not shown.
1.63 KB
Binary file not shown.
1.63 KB
Binary file not shown.
1.64 KB
Binary file not shown.
1.61 KB
Binary file not shown.
3.21 KB
Binary file not shown.
1.7 KB
Binary file not shown.
2.23 KB
Binary file not shown.
1.7 KB
Binary file not shown.
206 Bytes
Binary file not shown.
1.68 KB
Binary file not shown.
-1.1 KB
Binary file not shown.
1.69 KB
Binary file not shown.

PLTTests/bin/pages/admin/Logout.class

55 Bytes
Binary file not shown.
102 Bytes
Binary file not shown.
206 Bytes
Binary file not shown.
3.6 KB
Binary file not shown.
1.77 KB
Binary file not shown.
2.23 KB
Binary file not shown.
1.69 KB
Binary file not shown.

PLTTests/bin/pages/admin/Sites.class

-1.1 KB
Binary file not shown.
1.58 KB
Binary file not shown.
-3 Bytes
Binary file not shown.
-1.23 KB
Binary file not shown.
1.47 KB
Binary file not shown.
1.47 KB
Binary file not shown.
1.48 KB
Binary file not shown.
3.19 KB
Binary file not shown.
1.68 KB
Binary file not shown.
2.21 KB
Binary file not shown.
1.68 KB
Binary file not shown.
48 Bytes
Binary file not shown.

PLTTests/src/bin/admin/EditSite.class

1.66 KB
Binary file not shown.
-1.23 KB
Binary file not shown.
1.67 KB
Binary file not shown.

PLTTests/src/bin/admin/Logout.class

45 Bytes
Binary file not shown.

PLTTests/src/bin/admin/Members.class

-56 Bytes
Binary file not shown.
48 Bytes
Binary file not shown.
3.58 KB
Binary file not shown.
1.75 KB
Binary file not shown.
2.21 KB
Binary file not shown.
1.67 KB
Binary file not shown.

PLTTests/src/bin/admin/NewSite.class

1.54 KB
Binary file not shown.

PLTTests/src/bin/admin/Sites.class

-1.3 KB
Binary file not shown.
1.66 KB
Binary file not shown.
Binary file not shown.

PLTTests/src/pages/contributor/Articles.java

-25
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import junit.framework.Test;
2+
import junit.framework.TestSuite;
3+
4+
public class Contributor {
5+
6+
public static Test suite() {
7+
TestSuite suite = new TestSuite();
8+
suite.addTestSuite(Untitled.class);
9+
suite.addTestSuite(Untitled 2.class);
10+
suite.addTestSuite(Untitled 3.class);
11+
suite.addTestSuite(Untitled 4.class);
12+
return suite;
13+
}
14+
15+
public static void main(String[] args) {
16+
junit.textui.TestRunner.run(suite());
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package contributor;
2+
3+
import commons.CommonCode;
4+
import org.junit.*;
5+
import org.openqa.selenium.*;
6+
7+
/**
8+
*
9+
* Test to edit account
10+
* @author Madi Vachon
11+
**/
12+
13+
public class EditAccount extends CommonCode {
14+
private WebDriver driver;
15+
private String baseUrl;
16+
17+
@Test
18+
public void test() throws Exception {
19+
driver.get(baseUrl + "/articles");
20+
driver.findElement(By.cssSelector("button.menu")).click();
21+
driver.findElement(By.cssSelector("i.icon-chevron-down-thin.UserDetails-more")).click();
22+
driver.findElement(By.linkText("Your Account")).click();
23+
}
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package contributor;
2+
3+
import commons.CommonCode;
4+
import org.junit.*;
5+
import org.openqa.selenium.*;
6+
7+
/**
8+
*
9+
* Test to edit post
10+
* @author Madi Vachon
11+
**/
12+
13+
public class EditPost extends CommonCode {
14+
private WebDriver driver;
15+
private String baseUrl;
16+
17+
@Test
18+
public void test() throws Exception {
19+
driver.get(baseUrl + "/articles");
20+
driver.findElement(By.cssSelector("a.button--icon")).click();
21+
driver.findElement(By.linkText("Edit")).click();
22+
driver.findElement(By.id("article_picture")).clear();
23+
driver.findElement(By.id("article_picture")).sendKeys("/home/madi/Downloads/hedgehog.jpg");
24+
driver.findElement(By.id("article_english")).clear();
25+
driver.findElement(By.id("article_english")).sendKeys("Hedgehog");
26+
driver.findElement(By.id("article_phonetic")).clear();
27+
driver.findElement(By.id("article_phonetic")).sendKeys("Hedgehog");
28+
driver.findElement(By.id("article_audios_attributes_0_audio")).clear();
29+
driver.findElement(By.id("article_audios_attributes_0_audio")).sendKeys("/home/madi/Downloads/hedgehog.jpg");
30+
driver.findElement(By.id("article_audios_attributes_0_content")).clear();
31+
driver.findElement(By.id("article_audios_attributes_0_content")).sendKeys("Hedgehog");
32+
driver.findElement(By.cssSelector("button.button.button--primary")).click();
33+
}
34+
35+
}

PLTTests/src/pages/contributor/EditProfile.java

-25
This file was deleted.
+16-12
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
package login;
1+
package contributor;
2+
3+
import commons.CommonCode;
24
import org.junit.*;
35
import org.openqa.selenium.*;
46

5-
/*
6-
* @author Madi Paris
7-
* Test for Login UI feature
8-
*/
7+
/**
8+
*
9+
* Test to login
10+
* @author Madi Vachon
11+
**/
912

1013
public class Login extends CommonCode{
1114
private WebDriver driver;
1215
private String baseUrl;
1316

1417
@Test
15-
public void test() {
16-
driver.get(baseUrl + "/login");
17-
driver.findElement(By.id("username")).clear();
18-
driver.findElement(By.id("username")).sendKeys("contributor");
19-
driver.findElement(By.id("user_password")).clear();
20-
driver.findElement(By.id("user_password")).sendKeys("contributor");
21-
driver.findElement(By.name("commit")).click();
18+
public void test() throws Exception {
19+
driver.get(baseUrl + "/login");
20+
driver.findElement(By.id("username")).clear();
21+
driver.findElement(By.id("username")).sendKeys("contributor");
22+
driver.findElement(By.id("user_password")).clear();
23+
driver.findElement(By.id("user_password")).sendKeys("contributor");
24+
driver.findElement(By.name("commit")).click();
2225
}
26+
2327
}

PLTTests/src/pages/contributor/Logout.java

-25
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package contributor;
2+
3+
import commons.CommonCode;
4+
import org.junit.*;
5+
import org.openqa.selenium.*;
6+
7+
/**
8+
*
9+
* Test to create new article
10+
* @author Madi Vachon
11+
**/
12+
13+
public class NewArticle extends CommonCode {
14+
private WebDriver driver;
15+
private String baseUrl;
16+
17+
@Test
18+
public void test() throws Exception {
19+
driver.get(baseUrl + "/articles");
20+
driver.findElement(By.cssSelector("i.icon-plus")).click();
21+
driver.findElement(By.id("article_picture")).clear();
22+
driver.findElement(By.id("article_picture")).sendKeys("/home/madi/Downloads/cat.jpg");
23+
new Select(driver.findElement(By.id("article_category_id"))).selectByVisibleText("Animals");
24+
driver.findElement(By.id("article_english")).clear();
25+
driver.findElement(By.id("article_english")).sendKeys("Cat");
26+
driver.findElement(By.id("article_phonetic")).clear();
27+
driver.findElement(By.id("article_phonetic")).sendKeys("Cat");
28+
driver.findElement(By.id("article_audios_attributes_0_content")).clear();
29+
driver.findElement(By.id("article_audios_attributes_0_content")).sendKeys("Cat");
30+
driver.findElement(By.id("article_audios_attributes_0_audio")).clear();
31+
driver.findElement(By.id("article_audios_attributes_0_audio")).sendKeys("/home/madi/Downloads/cat.jpg");
32+
driver.findElement(By.cssSelector("button.button.button--primary")).click();
33+
}
34+
35+
}

PLTTests/src/pages/contributor/YourAccount.java

-25
This file was deleted.

0 commit comments

Comments
 (0)