Skip to content

Commit

Permalink
Release/v2.2.3 (#26)
Browse files Browse the repository at this point in the history
* Merge main into develop (#24)

* Release/v2.1 (#17)

* get main in sync with develop (#10) (#11)

* Update to v2 (#13)

* Simplify parameter resolvers and add APIRequestContext

* Add tests for APITestContext. add ability to declare rest config at parameter level

* Store APIContext after creating

* Update readme

* update pom to 2.0

* Bump to 2.1-SNAPSHOT

* Don't save APIRequestContext in store so multiple ones can be used to… (#16)

* Don't save APIRequestContext in store so multiple ones can be used to test different APIs together

* Update docs

* Bump version

* Release/2.2.1 (#20)

* Release/v2.1 (#17) (#18)

* get main in sync with develop (#10) (#11)

* Update to v2 (#13)

* Simplify parameter resolvers and add APIRequestContext

* Add tests for APITestContext. add ability to declare rest config at parameter level

* Store APIContext after creating

* Update readme

* update pom to 2.0

* Bump to 2.1-SNAPSHOT

* Don't save APIRequestContext in store so multiple ones can be used to… (#16)

* Don't save APIRequestContext in store so multiple ones can be used to test different APIs together

* Update docs

* Bump version

* Bump version

* Make parameter context for api request context optional (#19)

* Make parameter context for api request context optional

* remove useless checks for annotation

* bump version to 2.2.1

* Release/2.2.2 (#23)

* Main (#21)

* Release/v2.1 (#17)

* get main in sync with develop (#10) (#11)

* Update to v2 (#13)

* Simplify parameter resolvers and add APIRequestContext

* Add tests for APITestContext. add ability to declare rest config at parameter level

* Store APIContext after creating

* Update readme

* update pom to 2.0

* Bump to 2.1-SNAPSHOT

* Don't save APIRequestContext in store so multiple ones can be used to… (#16)

* Don't save APIRequestContext in store so multiple ones can be used to test different APIs together

* Update docs

* Bump version

* Release/2.2.1 (#20)

* Release/v2.1 (#17) (#18)

* get main in sync with develop (#10) (#11)

* Update to v2 (#13)

* Simplify parameter resolvers and add APIRequestContext

* Add tests for APITestContext. add ability to declare rest config at parameter level

* Store APIContext after creating

* Update readme

* update pom to 2.0

* Bump to 2.1-SNAPSHOT

* Don't save APIRequestContext in store so multiple ones can be used to… (#16)

* Don't save APIRequestContext in store so multiple ones can be used to test different APIs together

* Update docs

* Bump version

* Bump version

* Make parameter context for api request context optional (#19)

* Make parameter context for api request context optional

* remove useless checks for annotation

* bump version to 2.2.1

* bump version to 2.2.2-SNAPSHOT (#22)

* Update README.md

* expose config methods

* bump version to 2.2.2

* bump version to 2.2.3

* Feature/use empty rest config (#25)

* Use empty rest config when no config is provided

* Only use empty config if parameter context is null

* bump version to 2.2.3

* update version in readme
  • Loading branch information
uchagani authored Apr 12, 2022
1 parent c0f8aae commit 4df4601
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ the wiki for v1 docs. It is recommended to upgrade to v2.0. Migration help can
<dependency>
<groupId>io.github.uchagani</groupId>
<artifactId>junit-playwright</artifactId>
<version>2.2.1</version>
<version>2.2.3</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.uchagani</groupId>
<artifactId>junit-playwright</artifactId>
<version>2.2.2</version>
<version>2.2.3</version>

<name>junit-playwright</name>
<description>junit-playwright allows you to easily run Playwright-Java tests in parallel</description>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/io/github/uchagani/jp/EmptyRestConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.github.uchagani.jp;

class EmptyRestConfig implements PlaywrightRestConfig {
@Override
public RestConfig getRestConfig() {
return new RestConfig();
}
}
11 changes: 10 additions & 1 deletion src/main/java/io/github/uchagani/jp/ExtensionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ public static RestConfig getRestConfig(ParameterContext parameterContext, Extens
try {
configClass = extensionContext.getRequiredTestMethod().getAnnotation(UseRestConfig.class).value();
} catch (NullPointerException ignored1) {
configClass = extensionContext.getRequiredTestClass().getAnnotation(UseRestConfig.class).value();
try {
configClass = extensionContext.getRequiredTestClass().getAnnotation(UseRestConfig.class).value();
} catch (NullPointerException npe) {
if (parameterContext == null) {
// This should only happen when this method is called from another extension
configClass = EmptyRestConfig.class;
} else {
throw npe;
}
}
}
}
return createInstanceOfConfig(configClass).getRestConfig();
Expand Down

0 comments on commit 4df4601

Please sign in to comment.