1
0
mirror of synced 2026-08-04 14:36:55 +00:00

chore: roll driver to 1.38.0-alpha-aug-23 (#1362)

Reference https://github.com/microsoft/playwright-java/issues/1353
This commit is contained in:
Yury Semikhatsky
2023-08-23 18:41:40 -07:00
committed by GitHub
parent 7d5953c96e
commit fa75e29fcf
25 changed files with 390 additions and 157 deletions
@@ -1156,13 +1156,18 @@ public class ApiGenerator {
File assertionsDir = new File(cwd,"playwright/src/main/java/com/microsoft/playwright/assertions");
System.out.println("Writing assertion files to: " + dir.getCanonicalPath());
generate(api, assertionsDir, "com.microsoft.playwright.assertions", isAssertion());
generate(api, assertionsDir, "com.microsoft.playwright.assertions", isAssertion().and(isSoftAssertion().negate()));
}
private static Predicate<String> isAssertion() {
return className -> className.toLowerCase().contains("assert");
}
// TODO: Remove this predicate once SoftAssertions are implemented.
private static Predicate<String> isSoftAssertion() {
return className -> className.contains("SoftAssertions");
}
private void generate(JsonArray api, File dir, String packageName, Predicate<String> classFilter) throws IOException {
Map<String, TypeDefinition> topLevelTypes = new HashMap<>();
for (JsonElement entry: api) {