test: add share type e2e case
1. Add share type e2e case 2. Update e2e test config for manila codes: only run the other e2e zuul task when the manila related codes change Change-Id: Ia6d0e232ade38e7f4123a11e7cb4c677a53c961f
This commit is contained in:
parent
53c0aa9656
commit
14381f0e59
12
.zuul.yaml
12
.zuul.yaml
@ -568,16 +568,20 @@
|
|||||||
- ^src/pages/identity/.*$
|
- ^src/pages/identity/.*$
|
||||||
- ^src/pages/management/.*$
|
- ^src/pages/management/.*$
|
||||||
- ^src/pages/user-center/.*$
|
- ^src/pages/user-center/.*$
|
||||||
|
- ^src/pages/share/.*$
|
||||||
- ^src/stores/heat/.*$
|
- ^src/stores/heat/.*$
|
||||||
- ^src/stores/zun/.*$
|
- ^src/stores/zun/.*$
|
||||||
- ^src/stores/keystone/.*$
|
- ^src/stores/keystone/.*$
|
||||||
|
- ^src/stores/manila/.*$
|
||||||
- ^src/resources/heat/.*$
|
- ^src/resources/heat/.*$
|
||||||
- ^src/resources/zun/.*$
|
- ^src/resources/zun/.*$
|
||||||
- ^src/resources/keystone/.*$
|
- ^src/resources/keystone/.*$
|
||||||
|
- ^src/resources/manila/.*$
|
||||||
- ^test/e2e/integration/pages/configuration/.*$
|
- ^test/e2e/integration/pages/configuration/.*$
|
||||||
- ^test/e2e/integration/pages/heat/.*$
|
- ^test/e2e/integration/pages/heat/.*$
|
||||||
- ^test/e2e/integration/pages/zun/.*$
|
- ^test/e2e/integration/pages/zun/.*$
|
||||||
- ^test/e2e/integration/pages/identity/.*$
|
- ^test/e2e/integration/pages/identity/.*$
|
||||||
|
- ^test/e2e/integration/pages/manila/.*$
|
||||||
- ^test/e2e/integration/pages/error.spec.js
|
- ^test/e2e/integration/pages/error.spec.js
|
||||||
- ^test/e2e/integration/pages/login.spec.js
|
- ^test/e2e/integration/pages/login.spec.js
|
||||||
# no run
|
# no run
|
||||||
@ -619,16 +623,20 @@
|
|||||||
- ^src/pages/identity/.*$
|
- ^src/pages/identity/.*$
|
||||||
- ^src/pages/management/.*$
|
- ^src/pages/management/.*$
|
||||||
- ^src/pages/user-center/.*$
|
- ^src/pages/user-center/.*$
|
||||||
|
- ^src/pages/share/.*$
|
||||||
- ^src/stores/heat/.*$
|
- ^src/stores/heat/.*$
|
||||||
- ^src/stores/zun/.*$
|
- ^src/stores/zun/.*$
|
||||||
|
- ^src/stores/manila/.*$
|
||||||
- ^src/stores/keystone/.*$
|
- ^src/stores/keystone/.*$
|
||||||
- ^src/resources/heat/.*$
|
- ^src/resources/heat/.*$
|
||||||
- ^src/resources/zun/.*$
|
- ^src/resources/zun/.*$
|
||||||
- ^src/resources/keystone/.*$
|
- ^src/resources/keystone/.*$
|
||||||
|
- ^src/resources/manila/.*$
|
||||||
- ^test/e2e/integration/pages/configuration/.*$
|
- ^test/e2e/integration/pages/configuration/.*$
|
||||||
- ^test/e2e/integration/pages/heat/.*$
|
- ^test/e2e/integration/pages/heat/.*$
|
||||||
- ^test/e2e/integration/pages/zun/.*$
|
- ^test/e2e/integration/pages/zun/.*$
|
||||||
- ^test/e2e/integration/pages/identity/.*$
|
- ^test/e2e/integration/pages/identity/.*$
|
||||||
|
- ^test/e2e/integration/pages/manila/.*$
|
||||||
- ^test/e2e/integration/pages/error.spec.js
|
- ^test/e2e/integration/pages/error.spec.js
|
||||||
- ^test/e2e/integration/pages/login.spec.js
|
- ^test/e2e/integration/pages/login.spec.js
|
||||||
# no run
|
# no run
|
||||||
@ -709,16 +717,20 @@
|
|||||||
- ^src/pages/identity/.*$
|
- ^src/pages/identity/.*$
|
||||||
- ^src/pages/management/.*$
|
- ^src/pages/management/.*$
|
||||||
- ^src/pages/user-center/.*$
|
- ^src/pages/user-center/.*$
|
||||||
|
- ^src/pages/share/.*$
|
||||||
- ^src/stores/heat/.*$
|
- ^src/stores/heat/.*$
|
||||||
- ^src/stores/zun/.*$
|
- ^src/stores/zun/.*$
|
||||||
- ^src/stores/keystone/.*$
|
- ^src/stores/keystone/.*$
|
||||||
|
- ^src/stores/manila/.*$
|
||||||
- ^src/resources/heat/.*$
|
- ^src/resources/heat/.*$
|
||||||
- ^src/resources/zun/.*$
|
- ^src/resources/zun/.*$
|
||||||
- ^src/resources/keystone/.*$
|
- ^src/resources/keystone/.*$
|
||||||
|
- ^src/resources/manila/.*$
|
||||||
- ^test/e2e/integration/pages/configuration/.*$
|
- ^test/e2e/integration/pages/configuration/.*$
|
||||||
- ^test/e2e/integration/pages/heat/.*$
|
- ^test/e2e/integration/pages/heat/.*$
|
||||||
- ^test/e2e/integration/pages/zun/.*$
|
- ^test/e2e/integration/pages/zun/.*$
|
||||||
- ^test/e2e/integration/pages/identity/.*$
|
- ^test/e2e/integration/pages/identity/.*$
|
||||||
|
- ^test/e2e/integration/pages/manila/.*$
|
||||||
- ^test/e2e/integration/pages/error.spec.js
|
- ^test/e2e/integration/pages/error.spec.js
|
||||||
- ^test/e2e/integration/pages/login.spec.js
|
- ^test/e2e/integration/pages/login.spec.js
|
||||||
# no run
|
# no run
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
sed -i "s#baseUrl.*#baseUrl: https://127.0.0.1:9999#" $config_file
|
sed -i "s#baseUrl.*#baseUrl: https://127.0.0.1:9999#" $config_file
|
||||||
sed -i "s/- heat/# - heat/" $config_file
|
sed -i "s/- heat/# - heat/" $config_file
|
||||||
sed -i "s/- zun/# - zun/" $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#username:.*#username: admin#" $config_file
|
||||||
sed -i "s#password:.*#password: secretadmin#" $config_file
|
sed -i "s#password:.*#password: secretadmin#" $config_file
|
||||||
sed -i "s#usernameAdmin:.*#usernameAdmin: admin#" $config_file
|
sed -i "s#usernameAdmin:.*#usernameAdmin: admin#" $config_file
|
||||||
|
@ -15,6 +15,7 @@ env:
|
|||||||
extensions:
|
extensions:
|
||||||
- heat
|
- heat
|
||||||
- zun
|
- zun
|
||||||
|
- manila
|
||||||
testFiles:
|
testFiles:
|
||||||
- pages/login.spec.js
|
- pages/login.spec.js
|
||||||
- pages/error.spec.js
|
- pages/error.spec.js
|
||||||
@ -33,3 +34,5 @@ testFiles:
|
|||||||
# zun
|
# zun
|
||||||
- pages/zun/container.spec.js
|
- pages/zun/container.spec.js
|
||||||
- pages/zun/capsule.spec.js
|
- pages/zun/capsule.spec.js
|
||||||
|
# manila
|
||||||
|
- pages/manila/share-type.spec.js
|
||||||
|
@ -22,6 +22,7 @@ env:
|
|||||||
- ironic
|
- ironic
|
||||||
- swift
|
- swift
|
||||||
- zun
|
- zun
|
||||||
|
- manila
|
||||||
testFiles:
|
testFiles:
|
||||||
- pages/login.spec.js
|
- pages/login.spec.js
|
||||||
- pages/error.spec.js
|
- pages/error.spec.js
|
||||||
@ -69,3 +70,5 @@ testFiles:
|
|||||||
# zun
|
# zun
|
||||||
- pages/zun/container.spec.js
|
- pages/zun/container.spec.js
|
||||||
- pages/zun/capsule.spec.js
|
- pages/zun/capsule.spec.js
|
||||||
|
# manila
|
||||||
|
- pages/manila/share-type.spec.js
|
||||||
|
120
test/e2e/integration/pages/manila/share-type.spec.js
Normal file
120
test/e2e/integration/pages/manila/share-type.spec.js
Normal file
@ -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();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@ -65,6 +65,9 @@ export const stackListUrl = '/heat/stack';
|
|||||||
export const zunContainerListUrl = '/container/containers';
|
export const zunContainerListUrl = '/container/containers';
|
||||||
export const zunCapsuleListUrl = '/container/capsules';
|
export const zunCapsuleListUrl = '/container/capsules';
|
||||||
|
|
||||||
|
// manila
|
||||||
|
export const shareTypeListUrl = '/share/share-type-admin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// compute
|
// compute
|
||||||
instance: instanceListUrl,
|
instance: instanceListUrl,
|
||||||
|
Loading…
Reference in New Issue
Block a user