Skip to content

Commit

Permalink
Fix blackbox tests after image gallery feature improvement: ignore ch…
Browse files Browse the repository at this point in the history
…eck for images on cloud and edge, fix resource test via providing unchangable types
  • Loading branch information
AndriiLandiak committed Dec 8, 2023
1 parent 2ab43e6 commit 2855141
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,8 @@ private void assertWidgetsBundles(List<EntityId> entityIds) {
Optional<WidgetsBundle> cloudWidgetsBundle = cloudRestClient.getWidgetsBundleById(widgetsBundleId);
WidgetsBundle expected = edgeWidgetsBundle.get();
WidgetsBundle actual = cloudWidgetsBundle.get();
expected.setImage(null);
actual.setImage(null);
Assert.assertEquals("Widgets bundles on cloud and edge are different", expected, actual);
}
}
Expand All @@ -558,6 +560,8 @@ private void assertWidgetTypes(List<EntityId> entityIds) {
Optional<WidgetTypeDetails> cloudWidgetsBundle = cloudRestClient.getWidgetTypeById(widgetTypeId);
WidgetTypeDetails expected = edgeWidgetsBundle.get();
WidgetTypeDetails actual = cloudWidgetsBundle.get();
expected.setImage(null);
actual.setImage(null);
Assert.assertEquals("Widget types on cloud and edge are different", expected, actual);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ResourceClientTest extends AbstractContainerTest {
public void testSendResourceToEdge() {
// create resource on cloud
String title = "Resource on Cloud";
TbResource resource = saveResourceOnEdge(title, "ResourceCloud.jks", cloudRestClient);
TbResource resource = saveResourceOnEdge(title, "ResourceCloud.js", cloudRestClient);
Awaitility.await()
.pollInterval(500, TimeUnit.MILLISECONDS)
.atMost(30, TimeUnit.SECONDS)
Expand Down Expand Up @@ -64,7 +64,7 @@ public void testSendResourceToEdge() {
public void testSendResourceToCloud() {
// create resource on edge
String title = "Resource on Edge";
TbResource resource = saveResourceOnEdge(title, "ResourceEdge.jks", edgeRestClient);
TbResource resource = saveResourceOnEdge(title, "ResourceEdge.js", edgeRestClient);
Awaitility.await()
.pollInterval(500, TimeUnit.MILLISECONDS)
.atMost(30, TimeUnit.SECONDS)
Expand Down Expand Up @@ -95,7 +95,7 @@ private TbResource saveResourceOnEdge(String title, String resourceKey, RestClie
TbResource tbResource = new TbResource();
tbResource.setTitle(title);
tbResource.setResourceKey(resourceKey);
tbResource.setResourceType(ResourceType.JKS);
tbResource.setResourceType(ResourceType.JS_MODULE);
tbResource.setFileName(resourceKey);
tbResource.setData("Data".getBytes());
return restClient.saveResource(tbResource);
Expand Down

0 comments on commit 2855141

Please sign in to comment.