summaryrefslogtreecommitdiffstats
path: root/cps-events/pom.xml
blob: b9b399c950ecf0e9d7cb15099a2d63ee94900180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ============LICENSE_START=======================================================
  Copyright (c) 2021 Bell Canada.
  ================================================================================
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  ============LICENSE_END=========================================================
-->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.onap.cps</groupId>
        <artifactId>cps-parent</artifactId>
        <version>3.0.0-SNAPSHOT</version>
        <relativePath>../cps-parent/pom.xml</relativePath>
    </parent>

    <artifactId>cps-events</artifactId>
    <packaging>jar</packaging>

    <dependencies>
        <!-- Used by Generated classes for json mapping-->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <!-- T E S T   D E P E N D E N C I E S -->
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jsonschema2pojo</groupId>
                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
                <configuration>
                    <sourceDirectory>${basedir}/src/main/resources/schemas</sourceDirectory>
                    <targetPackage>org.onap.cps.event.model</targetPackage>
                    <generateBuilders>true</generateBuilders>
                    <serializable>true</serializable>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
sonBuilderAaiServiceInstances: JsonBuilder<AaiServiceInstancesModel> = new JsonBuilder<AaiServiceInstancesModel>(); beforeEach(() => { cy.readFile('cypress/support/jsonBuilders/mocks/jsons/defect710619/serviceE2E.json').then((res) => { jsonBuilderAAIService.basicJson( res, Cypress.config('baseUrl') + "/rest/models/services/**", 200, 0, "service-complexService") }); cy.readFile('cypress/support/jsonBuilders/mocks/jsons/defect710619/aaiSubViewEditForServiceWithSomeVFModuleE2E.json').then((res) => { jsonBuilderAAISubViewEditModel.basicJson( res, Cypress.config('baseUrl') + "/aai_sub_viewedit/**", 200, 0, "aai-sub-view-edit") }); cy.readFile('cypress/support/jsonBuilders/mocks/jsons/defect710619/aaiSubDetailsE2E.json').then((res) => { jsonBuilderAAISubDetailsModel.basicJson( res, Cypress.config('baseUrl') + "/aai_sub_details/**", 200, 0, "aai-sub-details") }); cy.readFile('cypress/support/jsonBuilders/mocks/jsons/defect710619/aaiServiceInstancesE2E.json').then((res) => { jsonBuilderAaiServiceInstances.basicJson( res, Cypress.config('baseUrl') + "/search_service_instances**", 200, 0, "aai-get-service-instances") }); cy.server().route({ url: Cypress.config('baseUrl') + '/mso/mso_create_vfmodule_instance/dedd680f-f3bd-46d8-97c7-b6fc28db9317/vnfs/1d45e992-e282-4ba5-b17a-9ca6562169e3', method: 'POST', status: 200, response: "[]", }).as("actualResumeCall"); cy.initVidMock(); cy.initTenants(); cy.login(); }); afterEach(() => { cy.screenshot(); }); it(`Resume Defect 710619 - with flag FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE is ON`, function () { cy.visit('/serviceModels.htm#/instantiate?subscriberId=e433710f-9217-458d-a79d-1c7aff376d89&subscriberName=SILVIA ROBBINS&serviceType=TYLER%20SILVIA&serviceInstanceId=dedd680f-f3bd-46d8-97c7-b6fc28db9317&aaiModelVersionId=4b60252a-bf6c-40df-9db5-98b4c363fdf4&isPermitted=true').then(()=>{ cy.wait('@service-complexService'); checkResumeAndPopup("dpa2bccfx5992v_base_module","vfModuleTreeNode-assigned"); }); }); it(`Resume Defect 710619 - with flag FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE is OFF`, function () { cy.readFile('cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json').then((res) => { cy.server() .route({ method: 'GET', delay : 0, status : 200, url : Cypress.config('baseUrl') + "/flags**", response : { "FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST" : true, "FLAG_ADD_MSO_TESTAPI_FIELD": true, "FLAG_1810_CR_SOFT_DELETE_ALACARTE_VF_MODULE": false } }).as('initFlags'); }); cy.visit('/serviceModels.htm#/instantiate?subscriberId=e433710f-9217-458d-a79d-1c7aff376d89&subscriberName=SILVIA ROBBINS&serviceType=TYLER%20SILVIA&serviceInstanceId=dedd680f-f3bd-46d8-97c7-b6fc28db9317&aaiModelVersionId=4b60252a-bf6c-40df-9db5-98b4c363fdf4&isPermitted=true'); cy.wait('@service-complexService'); checkResumeAndPopup("dpa2bccfx5992v_base_module","vfModuleTreeNode-assigned"); }); function checkResumeAndPopup(vfModuleName:string, vfModuleClassName:string) { cy.get('div').find('.' + vfModuleClassName) .getElementByDataTestsId('resumeVFModuleButton-' + vfModuleName).click().then(()=> { cy.getElementByDataTestsId('confirmResumeDeleteButton').should('be.visible') .getElementByDataTestsId('softDeleteButton').should('not.be.visible') .getElementByDataTestsId('lcpRegion').should('be.visible').select("option-irma-aic-hvf6") .getElementByDataTestsId('tenant').should('be.visible').select("bae71557c5bb4d5aac6743a4e5f1d054"); cy.getElementByDataTestsId('confirmResumeDeleteButton').not('.button--inactive').click().then(()=> { cy.wait('@actualResumeCall').then(xhr => { cy.readFile('cypress/support/jsonBuilders/mocks/jsons/defect710619/expectedResumeWithVGResults.json').then((expectedResult) => { cy.deepCompare(xhr.request.body, expectedResult); }); }); }); }); } }); });