summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java18
-rw-r--r--vid-webpack-master/cypress.json1
-rw-r--r--vid-webpack-master/package.cypress.json6
-rw-r--r--vid-webpack-master/package.json6
4 files changed, 15 insertions, 16 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
index 05075896a..d3c72dab6 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
@@ -6,9 +6,9 @@ import static org.hamcrest.CoreMatchers.endsWith;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.startsWith;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.testng.Assert.assertEquals;
import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
-import static vid.automation.test.services.SimulatorApi.getSimulatedResponsesPort;
-import static vid.automation.test.services.SimulatorApi.getSimulatorHost;
import com.google.common.collect.ImmutableList;
import java.lang.reflect.Method;
@@ -17,7 +17,6 @@ import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
-import org.junit.Assert;
import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGetInvalidResponse;
@@ -43,8 +42,7 @@ public class ProbeApiTest extends BaseApiTest {
private static final String MSO_QUERY_PARAMS = "filter=requestExecutionDate:EQUALS:01-01-2100";
private static final String AAI_QUERY_PARMAS = "business/customers?subscriber-type=INFRA&depth=0";
private static final String SDC_PATH_PARAMS = "46401eec-35bd-4e96-ad0d-0356ff6b8c8d/toscaModel";
- private static final String SCHEDULER_PATH =
- String.format("http://%s:%d/scheduler/v1/ChangeManagement/schedules/scheduleDetails/", getSimulatorHost(), getSimulatedResponsesPort());
+ private static final String SCHEDULER_PATH = "/scheduler/v1/ChangeManagement/schedules/scheduleDetails/";
@BeforeClass
@@ -210,7 +208,7 @@ public class ProbeApiTest extends BaseApiTest {
new ParameterizedTypeReference<List<ExternalComponentStatus>>() {
});
List<ExternalComponentStatus> probeResults = response.getBody();
- Assert.assertEquals(5, probeResults.size());
+ assertEquals(5, probeResults.size());
assertResultAsExpected(ExternalComponentStatus.Component.AAI, probeResults, expectedStatuses);
assertResultAsExpected(ExternalComponentStatus.Component.SDC, probeResults, expectedStatuses);
assertResultAsExpected(ExternalComponentStatus.Component.MSO, probeResults, expectedStatuses);
@@ -223,16 +221,16 @@ public class ProbeApiTest extends BaseApiTest {
ExternalComponentStatus componentStatus = probeResults.stream().filter(x -> x.getComponent() == component)
.findFirst().orElseThrow(() -> new AssertionError(component.name()+" result not found in response"));
- Assert.assertThat("wrong metadata for " + component, requestMetadataReflected(componentStatus.getMetadata()),
+ assertThat("wrong metadata for " + component, requestMetadataReflected(componentStatus.getMetadata()),
is(requestMetadataReflected(expectedStatus.getMetadata())));
- Assert.assertThat("wrong url for " + component, componentStatus.getMetadata().getUrl(),
+ assertThat("wrong url for " + component, componentStatus.getMetadata().getUrl(),
both(endsWith(expectedStatus.getMetadata().getUrl())).and(startsWith("http")));
- Assert.assertThat("wrong description for " + component, componentStatus.getMetadata().getDescription(),
+ assertThat("wrong description for " + component, componentStatus.getMetadata().getDescription(),
anyOf(equalTo(expectedStatus.getMetadata().getDescription()), startsWith(expectedStatus.getMetadata().getDescription())));
- Assert.assertThat("wrong status for " + component, componentStatus.isAvailable(), is(expectedStatus.isAvailable()));
+ assertThat("wrong status for " + component, componentStatus.isAvailable(), is(expectedStatus.isAvailable()));
}
//serialize fields except of fields we cannot know ahead of time
diff --git a/vid-webpack-master/cypress.json b/vid-webpack-master/cypress.json
index 7a6bc73fd..80fc773eb 100644
--- a/vid-webpack-master/cypress.json
+++ b/vid-webpack-master/cypress.json
@@ -9,6 +9,7 @@
"video": false,
"viewportWidth": 1920,
"viewportHeight": 1080,
+ "baseUrl": "http://localhost:8080/vid",
"reporterOptions": {
"mochaFile": "cypress/reports/TEST-cypress-[hash].xml",
"toConsole": true,
diff --git a/vid-webpack-master/package.cypress.json b/vid-webpack-master/package.cypress.json
index 096e61565..da6aa602f 100644
--- a/vid-webpack-master/package.cypress.json
+++ b/vid-webpack-master/package.cypress.json
@@ -4,16 +4,16 @@
"license": "Apache-2.0",
"scripts": {
"cypress:open": "cypress open",
- "cypress": "cypress open --config baseUrl=http://localhost:8080/vid ",
+ "cypress": "cypress open",
"cypress:run": "cypress run",
- "cypress:headless": "cypress run --config baseUrl=http://localhost:8080/vid "
+ "cypress:headless": "cypress run"
},
"private": true,
"dependencies": {},
"devDependencies": {
"@bahmutov/add-typescript-to-cypress": "2.0.0",
"@types/lodash": "4.14.121",
- "cypress": "^3.1.0",
+ "cypress": "3.6.1",
"typescript": "3.1.6",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.3.3"
diff --git a/vid-webpack-master/package.json b/vid-webpack-master/package.json
index 617a4516c..f76ab8745 100644
--- a/vid-webpack-master/package.json
+++ b/vid-webpack-master/package.json
@@ -19,9 +19,9 @@
"e2e": "ng e2e",
"build-watch": "ng build --watch",
"cypress:open": "cypress open",
- "cypress": "cypress open --config watchForFileChanges=false,baseUrl=http://localhost:8080/vid",
+ "cypress": "cypress open",
"cypress:run": "cypress run",
- "cypress:headless": "cypress run --config baseUrl=http://localhost:8080/vid",
+ "cypress:headless": "cypress run",
"format": "prettier",
"format:fix": "pretty-quick --staged",
"lint": "ng lint"
@@ -87,7 +87,7 @@
"angular2-template-loader": "0.6.2",
"babel-jest": "24.1.0",
"codelyzer": "4.5.0",
- "cypress": "^3.1.5",
+ "cypress": "3.6.1",
"hammerjs": "2.0.8",
"husky": "^1.3.1",
"istanbul-reports": "2.1.1",