diff --git a/.zuul.yaml b/.zuul.yaml index c5312c63..c9820c26 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -568,16 +568,20 @@ - ^src/pages/identity/.*$ - ^src/pages/management/.*$ - ^src/pages/user-center/.*$ + - ^src/pages/share/.*$ - ^src/stores/heat/.*$ - ^src/stores/zun/.*$ - ^src/stores/keystone/.*$ + - ^src/stores/manila/.*$ - ^src/resources/heat/.*$ - ^src/resources/zun/.*$ - ^src/resources/keystone/.*$ + - ^src/resources/manila/.*$ - ^test/e2e/integration/pages/configuration/.*$ - ^test/e2e/integration/pages/heat/.*$ - ^test/e2e/integration/pages/zun/.*$ - ^test/e2e/integration/pages/identity/.*$ + - ^test/e2e/integration/pages/manila/.*$ - ^test/e2e/integration/pages/error.spec.js - ^test/e2e/integration/pages/login.spec.js # no run @@ -619,16 +623,20 @@ - ^src/pages/identity/.*$ - ^src/pages/management/.*$ - ^src/pages/user-center/.*$ + - ^src/pages/share/.*$ - ^src/stores/heat/.*$ - ^src/stores/zun/.*$ + - ^src/stores/manila/.*$ - ^src/stores/keystone/.*$ - ^src/resources/heat/.*$ - ^src/resources/zun/.*$ - ^src/resources/keystone/.*$ + - ^src/resources/manila/.*$ - ^test/e2e/integration/pages/configuration/.*$ - ^test/e2e/integration/pages/heat/.*$ - ^test/e2e/integration/pages/zun/.*$ - ^test/e2e/integration/pages/identity/.*$ + - ^test/e2e/integration/pages/manila/.*$ - ^test/e2e/integration/pages/error.spec.js - ^test/e2e/integration/pages/login.spec.js # no run @@ -709,16 +717,20 @@ - ^src/pages/identity/.*$ - ^src/pages/management/.*$ - ^src/pages/user-center/.*$ + - ^src/pages/share/.*$ - ^src/stores/heat/.*$ - ^src/stores/zun/.*$ - ^src/stores/keystone/.*$ + - ^src/stores/manila/.*$ - ^src/resources/heat/.*$ - ^src/resources/zun/.*$ - ^src/resources/keystone/.*$ + - ^src/resources/manila/.*$ - ^test/e2e/integration/pages/configuration/.*$ - ^test/e2e/integration/pages/heat/.*$ - ^test/e2e/integration/pages/zun/.*$ - ^test/e2e/integration/pages/identity/.*$ + - ^test/e2e/integration/pages/manila/.*$ - ^test/e2e/integration/pages/error.spec.js - ^test/e2e/integration/pages/login.spec.js # no run diff --git a/playbooks/devstack/other/run-e2etests.yaml b/playbooks/devstack/other/run-e2etests.yaml index d8f29526..12f37774 100644 --- a/playbooks/devstack/other/run-e2etests.yaml +++ b/playbooks/devstack/other/run-e2etests.yaml @@ -16,6 +16,7 @@ sed -i "s#baseUrl.*#baseUrl: https://127.0.0.1:9999#" $config_file sed -i "s/- heat/# - heat/" $config_file sed -i "s/- zun/# - zun/" $config_file + sed -i "s/- manila/# - manila/" $config_file sed -i "s#username:.*#username: admin#" $config_file sed -i "s#password:.*#password: secretadmin#" $config_file sed -i "s#usernameAdmin:.*#usernameAdmin: admin#" $config_file diff --git a/test/e2e/config/config-other.yaml b/test/e2e/config/config-other.yaml index 4515e6bd..f11bb78f 100644 --- a/test/e2e/config/config-other.yaml +++ b/test/e2e/config/config-other.yaml @@ -15,6 +15,7 @@ env: extensions: - heat - zun + - manila testFiles: - pages/login.spec.js - pages/error.spec.js @@ -33,3 +34,5 @@ testFiles: # zun - pages/zun/container.spec.js - pages/zun/capsule.spec.js + # manila + - pages/manila/share-type.spec.js diff --git a/test/e2e/config/config.yaml b/test/e2e/config/config.yaml index 0d9f1586..d6512901 100644 --- a/test/e2e/config/config.yaml +++ b/test/e2e/config/config.yaml @@ -22,6 +22,7 @@ env: - ironic - swift - zun + - manila testFiles: - pages/login.spec.js - pages/error.spec.js @@ -69,3 +70,5 @@ testFiles: # zun - pages/zun/container.spec.js - pages/zun/capsule.spec.js + # manila + - pages/manila/share-type.spec.js diff --git a/test/e2e/integration/pages/manila/share-type.spec.js b/test/e2e/integration/pages/manila/share-type.spec.js new file mode 100644 index 00000000..64db7f28 --- /dev/null +++ b/test/e2e/integration/pages/manila/share-type.spec.js @@ -0,0 +1,120 @@ +// Copyright 2022 99cloud +// +// 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. + +import { onlyOn } from '@cypress/skip-test'; +import { shareTypeListUrl } from '../../../support/constants'; + +const manilaServiceEnabled = (Cypress.env('extensions') || []).includes( + 'manila' +); + +onlyOn(!manilaServiceEnabled, () => { + describe('Skip The Share Type Page', () => { + it('successfully skip', () => {}); + }); +}); + +onlyOn(manilaServiceEnabled, () => { + describe('The Share Type Page', () => { + const listUrl = shareTypeListUrl; + const uuid = Cypress._.random(0, 1e6); + const name = `e2e-share-type-${uuid}`; + const newname = `${name}-1`; + const extraKeyName = `e2e-extra-for-share-type-${uuid}`; + + beforeEach(() => { + cy.loginAdmin(listUrl); + }); + + it('successfully create', () => { + cy.clickHeaderButton(1) + .formInput('name', name) + .formText('description', 'create') + .formSelect('driver_handles_share_servers') + .clickModalActionSubmitButton() + .waitTableLoading(); + }); + + it('successfully detail', () => { + cy.tableSimpleSearchText(name) + .goToDetail() + .checkDetailName(name) + .clickDetailTab('Extra Spec', 'ExtraSpec') + .clickDetailTab('Share', 'share'); + cy.goBackToList(listUrl); + }); + + it('successfully create extra specs', () => { + cy.tableSimpleSearchText(name) + .goToDetail() + .clickDetailTab('Extra Spec') + .wait(5000) + .clickHeaderButton(1) + .formInput('keyName', extraKeyName) + .formInput('value', 1000) + .clickModalActionSubmitButton(); + }); + + it('successfully edit extra specs', () => { + cy.tableSimpleSearchText(name) + .goToDetail() + .clickDetailTab('Extra Spec') + .wait(5000) + .tableSearchText(extraKeyName) + .clickActionButtonByTitle('Edit') + .formInput('value', 2000) + .clickModalActionSubmitButton(); + }); + + it('successfully delete extra specs', () => { + cy.tableSimpleSearchText(name) + .goToDetail() + .clickDetailTab('Extra Spec') + .wait(5000) + .tableSearchText(extraKeyName) + .clickFirstActionButton() + .clickConfirmActionSubmitButton(); + }); + + it('successfully manage access to projects', () => { + cy.tableSimpleSearchText(name) + .clickActionInMore('Manage Access') + .formCheckboxClick('isPublic') + .formTableSelectAll('access') + .clickModalActionSubmitButton(); + }); + + it('successfully manage access to public', () => { + cy.tableSimpleSearchText(name) + .clickActionInMore('Manage Access') + .formCheckboxClick('isPublic') + .clickModalActionSubmitButton(); + }); + + it('successfully edit', () => { + cy.tableSimpleSearchText(name) + .clickFirstActionButton('Edit') + .formInput('name', newname) + .formText('description', 'edit') + .clickModalActionSubmitButton(); + }); + + it('successfully delete', () => { + cy.tableSimpleSearchText(newname) + .clickConfirmActionInMore('Delete') + .tableSimpleSearchText(newname) + .checkEmptyTable(); + }); + }); +}); diff --git a/test/e2e/support/constants.js b/test/e2e/support/constants.js index ebbdb668..4988f66e 100644 --- a/test/e2e/support/constants.js +++ b/test/e2e/support/constants.js @@ -65,6 +65,9 @@ export const stackListUrl = '/heat/stack'; export const zunContainerListUrl = '/container/containers'; export const zunCapsuleListUrl = '/container/capsules'; +// manila +export const shareTypeListUrl = '/share/share-type-admin'; + export default { // compute instance: instanceListUrl,