|
|
@ -6,6 +6,7 @@ import org.jetbrains.compose.web.tests.integration.common.waitTextToBe |
|
|
|
import org.junit.jupiter.api.Assertions.assertEquals |
|
|
|
import org.junit.jupiter.api.Assertions.assertEquals |
|
|
|
import org.junit.jupiter.api.Test |
|
|
|
import org.junit.jupiter.api.Test |
|
|
|
import org.openqa.selenium.By |
|
|
|
import org.openqa.selenium.By |
|
|
|
|
|
|
|
import org.openqa.selenium.Dimension |
|
|
|
import org.openqa.selenium.interactions.Actions |
|
|
|
import org.openqa.selenium.interactions.Actions |
|
|
|
|
|
|
|
|
|
|
|
class IntegrationTests : BaseIntegrationTests() { |
|
|
|
class IntegrationTests : BaseIntegrationTests() { |
|
|
@ -47,4 +48,25 @@ class IntegrationTests : BaseIntegrationTests() { |
|
|
|
actions.moveByOffset(300, 0).perform() |
|
|
|
actions.moveByOffset(300, 0).perform() |
|
|
|
waitTextToBe(textId = "txt", value = "not hovered") |
|
|
|
waitTextToBe(textId = "txt", value = "not hovered") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
fun `making screen width less than 400px changes the text color`() { |
|
|
|
|
|
|
|
openTestPage("smallWidthChangesTheTextColor") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val initialWindowSize = driver.manage().window().size |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
val span = driver.findElement(By.id("span1")) |
|
|
|
|
|
|
|
waitTextToBe(textId = "span1", "This a colored text") |
|
|
|
|
|
|
|
driver.manage().window().size = Dimension(1000, 1000) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals("rgba(0, 0, 0, 1)", span.getCssValue("color")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
driver.manage().window().size = Dimension(300, 300) |
|
|
|
|
|
|
|
waitTextToBe(textId = "span1", "This a colored text") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals("rgba(255, 0, 0, 1)", span.getCssValue("color")) |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
driver.manage().window().size = initialWindowSize |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|