diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/services.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/services.po.ts index e4f4561e820d9..cbc900813dc72 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/services.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/services.po.ts @@ -37,7 +37,13 @@ export class ServicesPageHelper extends PageHelper { }); } - addService(serviceType: string, exist?: boolean, count = '1', snmpVersion?: string) { + addService( + serviceType: string, + exist?: boolean, + count = '1', + snmpVersion?: string, + snmpPrivProtocol?: boolean + ) { cy.get(`${this.pages.create.id}`).within(() => { this.selectServiceType(serviceType); switch (serviceType) { @@ -67,12 +73,14 @@ export class ServicesPageHelper extends PageHelper { } else { cy.get('#engine_id').type('800C53F00000'); this.selectOption('auth_protocol', 'SHA'); - this.selectOption('privacy_protocol', 'DES'); + if (snmpPrivProtocol) { + this.selectOption('privacy_protocol', 'DES'); + cy.get('#snmp_v3_priv_password').type('testencrypt'); + } // Credentials cy.get('#snmp_v3_auth_username').type('test'); cy.get('#snmp_v3_auth_password').type('testpass'); - cy.get('#snmp_v3_priv_password').type('testencrypt'); } break; diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/09-services.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/09-services.e2e-spec.ts index c5fd7cb973376..c266c81b712c7 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/09-services.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/09-services.e2e-spec.ts @@ -77,7 +77,20 @@ describe('Services page', () => { it('should create and delete snmp-gateway service with version V3', () => { services.navigateTo('create'); - services.addService('snmp-gateway', false, '1', 'V3'); + services.addService('snmp-gateway', false, '1', 'V3', true); + services.checkExist('snmp-gateway', true); + + services.clickServiceTab('snmp-gateway', 'Details'); + cy.get('cd-service-details').within(() => { + services.checkServiceStatus('snmp-gateway'); + }); + + services.deleteService('snmp-gateway'); + }); + + it('should create and delete snmp-gateway service with version V3 and w/o privacy protocol', () => { + services.navigateTo('create'); + services.addService('snmp-gateway', false, '1', 'V3', false); services.checkExist('snmp-gateway', true); services.clickServiceTab('snmp-gateway', 'Details'); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html index e1e8317e9bf65..22b401ec86a61 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html @@ -63,7 +63,8 @@ -
+