Skip to content

Commit 565c39e

Browse files
committed
fixup - more more updates
1 parent 26f024c commit 565c39e

File tree

11 files changed

+37
-32
lines changed

11 files changed

+37
-32
lines changed

checkstyle-suppressions.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66

77
<suppressions>
88
<suppress checks="MissingJavadoc*" files="/test/"/>
9-
<!-- Temporary-->
10-
<suppress checks="*" files="/(junit|testng)/"/>
9+
<suppress checks="*" files="/(junit4|junit5|testng)/"/>
1110
</suppressions>

checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@
253253
<module name="AbbreviationAsWordInName">
254254
<property name="ignoreFinal" value="false"/>
255255
<property name="allowedAbbreviationLength" value="3"/>
256-
<property name="allowedAbbreviations" value="XML, URL, JUnit, TestNG" />
256+
<property name="allowedAbbreviations" value="XML, URL, JUnit, TestNG, APAC" />
257257
<property name="tokens"
258258
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF, ANNOTATION_FIELD_DEF,
259259
PARAMETER_DEF, VARIABLE_DEF, METHOD_DEF, PATTERN_VARIABLE_DEF, RECORD_DEF,

java/main/src/main/java/com/saucelabs/saucebindings/SauceOptions.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
public class SauceOptions extends com.saucelabs.saucebindings.options.SauceOptions {
2222

2323
/**
24+
* Create instance from capabilities
25+
*
2426
* @deprecated Use com.saucelabs.saucebindings.options.SauceOptions() instead
2527
*/
2628
@Deprecated
@@ -29,6 +31,8 @@ public SauceOptions() {
2931
}
3032

3133
/**
34+
* Create instance from Options
35+
*
3236
* @param options instance of Selenium browser options
3337
* @deprecated Use com.saucelabs.saucebindings.options.SauceOptions.chrome(options) instead
3438
*/

java/main/src/main/java/com/saucelabs/saucebindings/TimeoutStore.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
* @deprecated each timeout has its own setter in options.SauceOptions
1414
*/
1515
@Accessors(chain = true)
16-
@Setter @Getter
16+
@Setter
17+
@Getter
1718
@Deprecated
1819
public class TimeoutStore {
1920
private Integer implicitWait;

java/main/src/main/java/com/saucelabs/saucebindings/options/ChromeConfigurations.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import org.openqa.selenium.chrome.ChromeOptions;
44

5-
/**
6-
* Capabilities that apply only to Chrome sessions.
7-
*/
5+
/** Capabilities that apply only to Chrome sessions. */
86
public class ChromeConfigurations extends VDCConfigurations<ChromeConfigurations> {
97
ChromeConfigurations(ChromeOptions chromeOptions) {
108
validatePrefix("goog", chromeOptions.asMap());
@@ -13,7 +11,7 @@ public class ChromeConfigurations extends VDCConfigurations<ChromeConfigurations
1311
}
1412

1513
/**
16-
* Enables Performance Capture feature
14+
* Enables Performance Capture feature.
1715
*
1816
* @return instance of configuration
1917
*/
@@ -27,14 +25,14 @@ public ChromeConfigurations setCapturePerformance() {
2725
}
2826

2927
/**
30-
* Chrome requires the major browser version to match the major driver version
31-
* This setting might be useful if there is a bug in the minor or point version of the default chromedriver
28+
* Chrome requires the major browser version to match the major driver version.
29+
* This setting might be useful if there is a bug in the minor or point version of the default chromedriver.
30+
*
31+
* TODO: Consider ensuring this matches the browser's major version number
3232
*
3333
* @param version the specific version of driver to use for the test
3434
* @return instance of configuration
3535
*/
36-
// Use case is a different point release than the driver provided by default
37-
// TODO - consider ensuring this matches browser major version number
3836
public ChromeConfigurations setChromedriverVersion(String version) {
3937
sauceOptions.sauce().setChromedriverVersion(version);
4038
return this;

java/main/src/main/java/com/saucelabs/saucebindings/options/InternetExplorerConfigurations.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import org.openqa.selenium.ie.InternetExplorerOptions;
44

5-
/**
6-
* Capabilities that apply only to Internet Explorer sessions.
7-
*/
5+
/** Capabilities that apply only to Internet Explorer sessions. */
86
public class InternetExplorerConfigurations extends VDCConfigurations<InternetExplorerConfigurations> {
97
InternetExplorerConfigurations(InternetExplorerOptions internetExplorerOptions) {
108
validatePrefix("se", internetExplorerOptions.asMap());
@@ -13,7 +11,8 @@ public class InternetExplorerConfigurations extends VDCConfigurations<InternetEx
1311
}
1412

1513
/**
16-
* You should almost always use the latest version of Selenium
14+
* You should almost always use the latest version of Selenium.
15+
*
1716
* @param version the version of Selenium Server to use for the test
1817
* @return instance of configuration
1918
*/
@@ -23,7 +22,8 @@ public InternetExplorerConfigurations setSeleniumVersion(String version) {
2322
}
2423

2524
/**
26-
* This should match the Selenium version
25+
* This should match the Selenium version.
26+
*
2727
* @param version the specific version of Driver to use with the job
2828
* @return instance of configuration
2929
*/
@@ -36,6 +36,7 @@ public InternetExplorerConfigurations setIedriverVersion(String version) {
3636
* Sauce routes traffic through a proxy server so HTTPS connections with self-signed certificates work everywhere.
3737
* This method allows bypassing the proxy so browsers communicate directly the server.
3838
* Toggles avoid Proxy to True
39+
*
3940
* @return instance of configuration
4041
*/
4142
public InternetExplorerConfigurations setAvoidProxy() {

java/main/src/main/java/com/saucelabs/saucebindings/options/SafariConfigurations.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ public class SafariConfigurations extends VDCConfigurations<SafariConfigurations
1717
}
1818

1919
/**
20-
* Sauce routes traffic through a proxy server so that HTTPS connections with self-signed certificates work everywhere.
20+
* Traffic is routed through a proxy server so that HTTPS connections with self-signed certificates work everywhere.
2121
* This method allows bypassing the proxy so browsers communicate directly the server.
2222
* Toggles avoid Proxy to True
23+
*
2324
* @return instance of configuration
2425
*/
2526
public SafariConfigurations setAvoidProxy() {
@@ -28,7 +29,8 @@ public SafariConfigurations setAvoidProxy() {
2829
}
2930

3031
/**
31-
* You should almost always use the latest version of Selenium
32+
* You should almost always use the latest version of Selenium.
33+
*
3234
* @param version the version of Selenium Server to use for the test
3335
* @return instance of configuration
3436
*/

java/main/src/main/java/com/saucelabs/saucebindings/options/SauceOptions.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ public class SauceOptions extends BaseOptions {
4747
@Setter(AccessLevel.NONE) @Getter(AccessLevel.NONE) private SauceLabsOptions sauceLabsOptions;
4848

4949
/**
50+
* A way to store timeout values.
51+
*
5052
* @deprecated set timeouts directly with setter methods
5153
*/
5254
@Deprecated
@@ -136,8 +138,9 @@ public SauceOptions(Map<String, Object> map) {
136138
}
137139

138140
/**
139-
* This method allows building a default Sauce Options instance for Chrome
140-
* Call build() method on return value rather than using directly
141+
* This method allows building a default Sauce Options instance for Chrome.
142+
* Call build() method on return value rather than using directly.
143+
*
141144
* @return instance of ChromeConfigurations
142145
* @see ChromeConfigurations#build()
143146
*/
@@ -192,7 +195,7 @@ public static FirefoxConfigurations firefox() {
192195
}
193196

194197
/**
195-
* This method allows building a Sauce Options instance for Firefox using a provided Selenium FirefoxOptions instance
198+
* Allows building a Sauce Options instance for Firefox using a provided Selenium FirefoxOptions instance
196199
* Call build() method on return value rather than using directly
197200
*
198201
* @param firefoxOptions an instance of a Selenium FirefoxOptions class
@@ -204,7 +207,7 @@ public static FirefoxConfigurations firefox(FirefoxOptions firefoxOptions) {
204207
}
205208

206209
/**
207-
* This method allows building a default Sauce Options instance for Internet Explorer
210+
* Allows building a default Sauce Options instance for Internet Explorer
208211
* Call build() method on return value rather than using directly
209212
*
210213
* @return instance of InternetExplorerConfigurations
@@ -215,7 +218,8 @@ public static InternetExplorerConfigurations ie() {
215218
}
216219

217220
/**
218-
* This method allows building a Sauce Options instance for Internet Explorer using a provided Selenium InternetExplorerOptions instance
221+
* Allows building a Sauce Options instance for Internet Explorer.
222+
* Uses a provided Selenium InternetExplorerOptions instance
219223
* Call build() method on return value rather than using directly
220224
*
221225
* @param internetExplorerOptions an instance of a Selenium InternetExplorerOptions class
@@ -416,9 +420,9 @@ public Duration getScriptTimeout() {
416420

417421
/**
418422
*
419-
* @deprecated Use setters for specific timeouts instead
420423
* @param timeouts valid timeouts and their associated values in milliseconds
421424
* @return instance of this class
425+
* @deprecated Use setters for specific timeouts instead
422426
*/
423427
@Deprecated
424428
public SauceOptions setTimeouts(Map<Timeouts, Long> timeouts) {

java/main/src/main/java/com/saucelabs/saucebindings/options/VDCConfigurations.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
*/
1818
public abstract class VDCConfigurations<T extends VDCConfigurations<T>> extends BaseConfigurations<T> {
1919

20-
// W3C Values
21-
2220
/**
21+
* Version of Browser.
2322
* TODO: Set restrictions on allowed versions in subclass
2423
*
2524
* @param version The version of the browser you want to use in your test
@@ -110,8 +109,6 @@ public T setScriptTimeout(Duration timeout) {
110109
return (T) this;
111110
}
112111

113-
// Sauce Values common to all browser sessions:
114-
115112
/**
116113
* Toggles off Sauce Labs recording video of the session.
117114
* Not recommended since videos are very useful for debugging failures and visual reproduction of actions taken.

java/main/src/test/java/com/saucelabs/saucebindings/options/SauceOptionsDeprecatedMapTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import org.junit.Test;
66

77
/**
8-
* This Test uses the default SauceOptions constructor then adds configs via Map using mergeCapabilities
9-
*
8+
* This Test uses the default SauceOptions constructor then adds configs via Map using mergeCapabilities.
109
* This functionality has been replaced by supporting config files themselves in the constructor
1110
*/
1211
public class SauceOptionsDeprecatedMapTest {

0 commit comments

Comments
 (0)