From 31190f8edd801a2ead8ba3d49982cbdbc838885d Mon Sep 17 00:00:00 2001 From: titusfortner Date: Fri, 23 Sep 2022 12:00:50 -0500 Subject: [PATCH] [java] fix aliases for windows 7 and vista platform name --- java/src/org/openqa/selenium/Platform.java | 2 +- java/test/org/openqa/selenium/PlatformTest.java | 2 +- .../org/openqa/selenium/remote/DesiredCapabilitiesTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/org/openqa/selenium/Platform.java b/java/src/org/openqa/selenium/Platform.java index f819e1ddfb429..7b5255d1a1ca0 100644 --- a/java/src/org/openqa/selenium/Platform.java +++ b/java/src/org/openqa/selenium/Platform.java @@ -58,7 +58,7 @@ public String toString() { /** * For versions of Windows that "feel like" Windows Vista. */ - VISTA("windows 7", "win7") { + VISTA("windows vista", "Windows Server 2008") { @Override public Platform family() { return WINDOWS; diff --git a/java/test/org/openqa/selenium/PlatformTest.java b/java/test/org/openqa/selenium/PlatformTest.java index 7e9c72a502ce1..fa0713bc14eaa 100644 --- a/java/test/org/openqa/selenium/PlatformTest.java +++ b/java/test/org/openqa/selenium/PlatformTest.java @@ -100,7 +100,7 @@ public void testShouldIdentifyXPVariants() { @Test public void testShouldIdentifyVistaVariants() { - assertAllAre(Platform.VISTA, "Windows Vista", "windows server 2008", "Windows 7", "win7"); + assertAllAre(Platform.VISTA, "Windows Vista", "windows server 2008"); } @Test diff --git a/java/test/org/openqa/selenium/remote/DesiredCapabilitiesTest.java b/java/test/org/openqa/selenium/remote/DesiredCapabilitiesTest.java index 8d9e9059f8fb8..039ed39d85123 100644 --- a/java/test/org/openqa/selenium/remote/DesiredCapabilitiesTest.java +++ b/java/test/org/openqa/selenium/remote/DesiredCapabilitiesTest.java @@ -94,7 +94,7 @@ public void testExtractDebugLogLevelFromCapabilityMap() { @Test public void shouldAutomaticallyConvertPlatformFromStringToEnum() { DesiredCapabilities caps = new DesiredCapabilities(); - caps.setCapability(CapabilityType.PLATFORM_NAME, "windows 7"); + caps.setCapability(CapabilityType.PLATFORM_NAME, "Windows Server 2008"); assertThat(caps.getCapability(CapabilityType.PLATFORM_NAME)).isEqualTo(Platform.VISTA); caps.setCapability(CapabilityType.PLATFORM_NAME, "win8.1"); assertThat(caps.getCapability(CapabilityType.PLATFORM_NAME)).isEqualTo(Platform.WIN8_1);