File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
main/java/io/appium/java_client/remote/options
test/java/io/appium/java_client/remote/options Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 23
23
public class W3CCapabilityKeys implements Predicate <String > {
24
24
public static final W3CCapabilityKeys INSTANCE = new W3CCapabilityKeys ();
25
25
private static final Predicate <String > ACCEPTED_W3C_PATTERNS = Stream .of (
26
- "^[\\ w- ]+:.*$" ,
26
+ "^[^: ]+:.*$" ,
27
27
"^acceptInsecureCerts$" ,
28
28
"^browserName$" ,
29
29
"^browserVersion$" ,
Original file line number Diff line number Diff line change
1
+ package io .appium .java_client .remote .options ;
2
+
3
+ import static org .junit .jupiter .api .Assertions .*;
4
+
5
+ import org .junit .jupiter .params .ParameterizedTest ;
6
+ import org .junit .jupiter .params .provider .CsvSource ;
7
+
8
+ class BaseOptionsTest {
9
+
10
+
11
+ @ ParameterizedTest
12
+ @ CsvSource ({
13
+ "test, appium:test" ,
14
+ "appium:test, appium:test" ,
15
+ "browserName, browserName" ,
16
+ "digital.ai:accessKey, digital.ai:accessKey" ,
17
+ "digital-ai:accessKey, digital-ai:accessKey" ,
18
+ "<VENDOR-KEY>:<CAP-NAME>:<SUB-CAP-NAME>, <VENDOR-KEY>:<CAP-NAME>:<SUB-CAP-NAME>" ,
19
+ "digital-ai:my_custom-cap:xyz, digital-ai:my_custom-cap:xyz" ,
20
+ "digital-ai:my_custom-cap?xyz, digital-ai:my_custom-cap?xyz" ,
21
+ })
22
+ void verifyW3CMapping (String capName , String expected ) {
23
+ var w3cName = BaseOptions .toW3cName (capName );
24
+ assertEquals (expected , w3cName );
25
+ }
26
+ }
You can’t perform that action at this time.
0 commit comments