From: Volker Theile Date: Thu, 23 Apr 2020 12:47:53 +0000 (+0200) Subject: mgr/dashboard: The max. buckets field in RGW user form should be pre-filled X-Git-Tag: v16.1.0~2392^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a08dad6b18873cf12aac964d69233bd2f4af535a;p=ceph.git mgr/dashboard: The max. buckets field in RGW user form should be pre-filled Fixes: https://tracker.ceph.com/issues/45204 Signed-off-by: Volker Theile --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/users.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/users.po.ts index f65464537ac4..6796ff5be5d5 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/users.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/users.po.ts @@ -21,6 +21,7 @@ export class UsersPageHelper extends PageHelper { // Enter max buckets this.selectOption('max_buckets_mode', 'Custom'); + cy.get('#max_buckets').should('exist').should('have.value', '1000'); cy.get('#max_buckets').click().clear().type(maxbuckets); // Click the create button and wait for user to be made @@ -102,7 +103,7 @@ export class UsersPageHelper extends PageHelper { const uname = '000invalid_edit_user'; // creating this user to edit for the test this.navigateTo('create'); - this.create(uname, 'xxx', 'xxx@xxx', '1'); + this.create(uname, 'xxx', 'xxx@xxx', '50'); this.navigateEdit(name); @@ -120,7 +121,10 @@ export class UsersPageHelper extends PageHelper { cy.contains('#display_name + .invalid-feedback', 'This field is required.'); // put negative max buckets to make field invalid - this.expectSelectOption('max_buckets_mode', 'Custom'); + this.selectOption('max_buckets_mode', 'Disabled'); + cy.get('#max_buckets').should('not.exist'); + this.selectOption('max_buckets_mode', 'Custom'); + cy.get('#max_buckets').should('exist').should('have.value', '50'); cy.get('#max_buckets').clear().type('-5').blur().should('have.class', 'ng-invalid'); cy.contains('#max_buckets + .invalid-feedback', 'The entered value must be >= 1.'); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html index a34d3f949902..4a8333abc73c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html @@ -82,7 +82,8 @@