/*
 * (C) Copyright 2019 Boni Garcia (http://bonigarcia.github.io/)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package io.github.bonigarcia.seljup.test.selenide;

// tag::snippet-in-doc[]
import static io.github.bonigarcia.seljup.BrowserType.CHROME;
import static io.github.bonigarcia.seljup.BrowserType.FIREFOX;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import com.codeborne.selenide.SelenideDriver;

import io.github.bonigarcia.seljup.DockerBrowser;
import io.github.bonigarcia.seljup.SeleniumExtension;

public class SelenideDockerJupiterTest {

    @RegisterExtension
    static SeleniumExtension seleniumExtension = new SeleniumExtension();

    @BeforeAll
    static void setup() {
        seleniumExtension.getConfig().setVnc(true);
    }

    @Test
    public void testDockerSelenideChrome(
            @DockerBrowser(type = CHROME) SelenideDriver driver) {
        driver.open("https://bonigarcia.github.io/selenium-jupiter/");
        assertThat(driver.title(),
                containsString("JUnit 5 extension for Selenium"));
    }

    @Test
    public void testDockerSelenideFirefox(
            @DockerBrowser(type = FIREFOX, version = "beta") SelenideDriver driver) {
        driver.open("https://bonigarcia.github.io/selenium-jupiter/");
        assertThat(driver.title(),
                containsString("JUnit 5 extension for Selenium"));
    }

}
// end::snippet-in-doc[]

@@ -720,16 +720,73 @@
 -doc%5B%5D%0D%0A
+import static com.codeborne.selenide.Condition.visible;%0D%0A
 import s
@@ -840,16 +840,16 @@
 HROME;%0D%0A
-
 import s
@@ -1014,16 +1014,64 @@
 rtThat;%0D
+%0Aimport static org.openqa.selenium.By.linkText;%0D
 %0A%0D%0Aimpor
@@ -1249,16 +1249,64 @@
 Driver;%0D
+%0Aimport com.codeborne.selenide.SelenideElement;%0D
 %0A%0D%0Aimpor
@@ -1864,100 +1864,116 @@
     
-assertThat(driver.title(),%0D%0A                containsString(%22JUnit 5 extension for Selenium%22)
+SelenideElement about = driver.$(linkText(%22About%22));%0D%0A        about.shouldBe(visible);%0D%0A        about.click(
 );%0D%0A

Enhance Selenide Docker test