forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev UI qute config - switch to strict rendering
- resolves quarkusio#18485 - also added smoke tests for most of the extensions that provide qute-based UI (cherry picked from commit a14ff43)
- Loading branch information
Showing
23 changed files
with
570 additions
and
37 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
extensions/infinispan-client/deployment/src/main/resources/dev-templates/embedded.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
...s/vertx-http/deployment/src/main/resources/dev-templates/tags/nonActionableExtension.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...ration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleArcSmokeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package io.quarkus.test.devconsole; | ||
|
||
import javax.enterprise.context.ApplicationScoped; | ||
import javax.enterprise.event.Observes; | ||
import javax.inject.Named; | ||
|
||
import org.hamcrest.Matchers; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.test.QuarkusDevModeTest; | ||
import io.restassured.RestAssured; | ||
|
||
/** | ||
* Note that this test cannot be placed under the relevant {@code -deployment} module because then the DEV UI processor would | ||
* not be able to locate the template resources correctly. | ||
*/ | ||
public class DevConsoleArcSmokeTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusDevModeTest test = new QuarkusDevModeTest() | ||
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) | ||
.addClasses(Foo.class)); | ||
|
||
@Test | ||
public void testPages() { | ||
RestAssured | ||
.get("q/dev/io.quarkus.quarkus-arc/beans") | ||
.then() | ||
.statusCode(200).body(Matchers.containsString("io.quarkus.test.devconsole.DevConsoleArcSmokeTest$Foo")); | ||
RestAssured | ||
.get("q/dev/io.quarkus.quarkus-arc/observers") | ||
.then() | ||
.statusCode(200) | ||
.body(Matchers.containsString("io.quarkus.test.devconsole.DevConsoleArcSmokeTest$Foo#onStr")); | ||
RestAssured | ||
.get("q/dev/io.quarkus.quarkus-arc/events") | ||
.then() | ||
.statusCode(200).body(Matchers.containsString("io.quarkus.runtime.StartupEvent")); | ||
RestAssured | ||
.get("q/dev/io.quarkus.quarkus-arc/invocations") | ||
.then() | ||
.statusCode(200); | ||
RestAssured | ||
.get("q/dev/io.quarkus.quarkus-arc/removed-beans") | ||
.then() | ||
.statusCode(200).body(Matchers.containsString("org.jboss.logging.Logger")); | ||
} | ||
|
||
@Named | ||
@ApplicationScoped | ||
public static class Foo { | ||
|
||
void onStr(@Observes String event) { | ||
} | ||
|
||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
...tion-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleCacheSmokeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package io.quarkus.test.devconsole; | ||
|
||
import javax.inject.Singleton; | ||
|
||
import org.hamcrest.Matchers; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.cache.CacheResult; | ||
import io.quarkus.test.QuarkusDevModeTest; | ||
import io.restassured.RestAssured; | ||
|
||
/** | ||
* Note that this test cannot be placed under the relevant {@code -deployment} module because then the DEV UI processor would | ||
* not be able to locate the template resources correctly. | ||
*/ | ||
public class DevConsoleCacheSmokeTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusDevModeTest config = new QuarkusDevModeTest() | ||
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class).addClass(MyBean.class)); | ||
|
||
@Test | ||
public void testCaches() { | ||
RestAssured.get("q/dev/io.quarkus.quarkus-cache/caches") | ||
.then() | ||
.statusCode(200).body(Matchers.containsString("myCache")); | ||
} | ||
|
||
@Singleton | ||
public static class MyBean { | ||
|
||
@CacheResult(cacheName = "myCache") | ||
String ping() { | ||
return "foo"; | ||
} | ||
|
||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
...ion-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleConfigSmokeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.quarkus.test.devconsole; | ||
|
||
import org.hamcrest.Matchers; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.test.QuarkusDevModeTest; | ||
import io.restassured.RestAssured; | ||
|
||
/** | ||
* Note that this test cannot be placed under the relevant {@code -deployment} module because then the DEV UI processor would | ||
* not be able to locate the template resources correctly. | ||
*/ | ||
public class DevConsoleConfigSmokeTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusDevModeTest config = new QuarkusDevModeTest() | ||
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)); | ||
|
||
@Test | ||
public void testConfigEditor() { | ||
RestAssured.get("q/dev/io.quarkus.quarkus-vertx-http/config") | ||
.then() | ||
.statusCode(200).body(Matchers.containsString("Config Editor")); | ||
|
||
} | ||
} |
Oops, something went wrong.