Permalink
Browse files

place browser window on the right side of screen

so it's convenient to demo GMail tests, showing the code at the left side of screen.
  • Loading branch information...
asolntsev committed Jul 13, 2018
1 parent fa9a54f commit 959d4e06c69477c90f63a86db7bc91f1994e6d98
View
@@ -20,7 +20,7 @@ repositories{
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'com.codeborne:selenide:4.11.4'
testCompile 'com.codeborne:selenide:4.12.2'
}
task libs(type: Sync) {
@@ -28,8 +28,8 @@ public static void openInbox() {
baseUrl = "http://gmail.com";
startMaximized = false;
browser = "chrome";
browserPosition = "900x10";
browserSize = "800x900";
browserPosition = "890x10";
browserSize = "780x950";
addListener(new Highlighter());
open("/");
@@ -4,6 +4,7 @@
import org.openqa.selenium.By;
import static com.codeborne.selenide.CollectionCondition.size;
import static com.codeborne.selenide.Condition.text;
import static com.codeborne.selenide.Condition.visible;
import static com.codeborne.selenide.Selectors.*;
import static com.codeborne.selenide.Selenide.$;
@@ -12,7 +13,9 @@
public class InboxSpec extends GmailTests {
@Test
public void showsNumberOfUnreadMessages() {
$(By.xpath("//div[@role='navigation']")).find(withText("Inbox")).shouldBe(visible);
$(By.xpath("//div[@role='navigation']")).find(withText("Inbox"))
.shouldBe(visible)
.shouldHave(text("Inbox (1)"));
}
@Test
@@ -21,7 +21,7 @@ public void userCanComposeEmail() {
$(withText("Your message has been sent.")).shouldBe(visible);
$(byText("Undo")).click();
// highlight($(byText("Sending has been undone.")).should(appear));
highlight($(byText("Sending has been undone.")).should(appear));
$(".editable").should(appear)
.append("Hello from Kraków")

0 comments on commit 959d4e0

Please sign in to comment.