Skip to content

Commit 52aebb5

Browse files
committed
[java] Fixing Firefox tests after Firefox 107 release
1 parent 8e59feb commit 52aebb5

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

java/test/org/openqa/selenium/ContentEditableTest.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717

1818
package org.openqa.selenium;
1919

20-
import static org.assertj.core.api.Assertions.assertThat;
21-
import static org.junit.jupiter.api.Assumptions.assumeFalse;
22-
import static org.openqa.selenium.testing.drivers.Browser.IE;
23-
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
24-
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
25-
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
26-
import static org.openqa.selenium.testing.TestUtilities.isFirefox;
27-
2820
import org.junit.jupiter.api.AfterEach;
2921
import org.junit.jupiter.api.Test;
3022
import org.openqa.selenium.testing.JupiterTestBase;
3123
import org.openqa.selenium.testing.NotYetImplemented;
3224

25+
import static org.assertj.core.api.Assertions.assertThat;
26+
import static org.junit.jupiter.api.Assumptions.assumeFalse;
27+
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
28+
import static org.openqa.selenium.testing.TestUtilities.isFirefox;
29+
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
30+
import static org.openqa.selenium.testing.drivers.Browser.IE;
31+
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
32+
3333
class ContentEditableTest extends JupiterTestBase {
3434

3535
@AfterEach
@@ -124,7 +124,6 @@ public void testShouldAppendToTinyMCE() {
124124
}
125125

126126
@Test
127-
@NotYetImplemented(value = FIREFOX, reason = "Doesn't write anything")
128127
@NotYetImplemented(value = SAFARI, reason = "Prepends text")
129128
public void appendsTextToEndOfContentEditableWithMultipleTextNodes() {
130129
driver.get(appServer.whereIs("content-editable.html"));

java/test/org/openqa/selenium/TextHandlingTest.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717

1818
package org.openqa.selenium;
1919

20-
import static org.assertj.core.api.Assertions.assertThat;
21-
import static org.openqa.selenium.testing.TestUtilities.isFirefox;
22-
import static org.openqa.selenium.testing.drivers.Browser.ALL;
23-
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;
24-
import static org.openqa.selenium.testing.drivers.Browser.IE;
25-
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
26-
2720
import org.junit.jupiter.api.Test;
2821
import org.openqa.selenium.environment.webserver.Page;
2922
import org.openqa.selenium.testing.Ignore;
3023
import org.openqa.selenium.testing.JupiterTestBase;
3124
import org.openqa.selenium.testing.NotYetImplemented;
3225

26+
import static org.assertj.core.api.Assertions.assertThat;
27+
import static org.openqa.selenium.testing.drivers.Browser.ALL;
28+
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;
29+
import static org.openqa.selenium.testing.drivers.Browser.IE;
30+
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;
31+
3332
class TextHandlingTest extends JupiterTestBase {
3433

3534
private static final String NEW_LINE = "\n";
@@ -408,9 +407,9 @@ void canHandleTextThatLooksLikeANumber() {
408407
public void canHandleTextTransformProperty() {
409408
driver.get(pages.simpleTestPage);
410409
assertThat(driver.findElement(By.id("capitalized")).getText())
411-
.isEqualTo(isFirefox(driver) ? "Hello, World! Bla-bla-BLA" : "Hello, World! Bla-Bla-BLA");
410+
.isEqualTo("Hello, World! Bla-Bla-BLA");
412411
assertThat(driver.findElement(By.id("lowercased")).getText())
413-
.isEqualTo("hello, world! bla-bla-bla");
412+
.isEqualTo("hello, world! bla-bla-bla");
414413
assertThat(driver.findElement(By.id("uppercased")).getText())
415414
.isEqualTo("HELLO, WORLD! BLA-BLA-BLA");
416415
}

0 commit comments

Comments
 (0)