Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public class W3CCapabilityKeys implements Predicate<String> {
public static final W3CCapabilityKeys INSTANCE = new W3CCapabilityKeys();
private static final Predicate<String> ACCEPTED_W3C_PATTERNS = Stream.of(
"^[\\w-]+:.*$",
"^[\\w-\\.]+:.*$",
"^acceptInsecureCerts$",
"^browserName$",
"^browserVersion$",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.appium.java_client.remote.options;

import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

import static org.junit.jupiter.api.Assertions.assertEquals;

class BaseOptionsTest {

@ParameterizedTest
@CsvSource({
"test, appium:test",
"appium:test, appium:test",
"browserName, browserName",
"digital.ai:accessKey, digital.ai:accessKey",
"digital-ai:accessKey, digital-ai:accessKey",
"digital-ai:my_custom-cap:xyz, digital-ai:my_custom-cap:xyz",
"digital-ai:my_custom-cap?xyz, digital-ai:my_custom-cap?xyz",
})
void verifyW3CMapping(String capName, String expected) {
var w3cName = BaseOptions.toW3cName(capName);
assertEquals(expected, w3cName);
}
}