after(() => {
// Deletes images test pool
pools.navigateTo();
- pools.delete(poolName, null, null, true);
+ pools.delete(poolName, null, null, true, false, false, true);
pools.navigateTo();
pools.existTableCell(poolName, false);
});
});
it('should delete image', () => {
- images.delete(newImageName, null, null, true);
+ images.delete(newImageName, null, null, true, false, false, true);
});
});
afterEach(() => {
pools.navigateTo();
- pools.delete(poolName, null, null, true);
+ pools.delete(poolName, null, null, true, false, false, true);
});
});
});
}
remove(hostname: string) {
- super.delete(hostname, this.columnIndex.hostname, 'hosts', true, false, true);
+ super.delete(hostname, this.columnIndex.hostname, 'hosts', true, false, true, true);
}
// Add or remove labels on a host, then verify labels in the table
it('should delete pool and check audit logs reacted', () => {
pools.navigateTo();
- pools.delete(poolname, null, null, true);
+ pools.delete(poolname, null, null, true, false, false, true);
logs.checkAuditForPoolFunction(poolname, 'delete', hour, minute);
});
});
cy.get('cds-modal input#confirmation_input').click({ force: true });
});
+Then('I confirm the resource {string}', (name: string) => {
+ cy.get('cds-modal input#resource_name').type(name);
+});
+
And('I confirm to {string}', (action: string) => {
cy.contains('cd-modal button', action).click();
cy.get('cd-modal').should('not.exist');
And I select a row "test_cephfs"
And I click on "Remove" button from the table actions
Then I should see the carbon modal
- And I check the tick box in carbon modal
+ And I confirm the resource "test_cephfs"
And I click on "Remove File System" button
Then I should not see a row with "test_cephfs"
And I go to the "Subvolumes" tab
And I select a row "test_clone" in the expanded row
And I click on "Remove" button from the table actions in the expanded row
- And I check the tick box in carbon modal
+ And I confirm the resource "test_clone"
And I click on "Remove Subvolume" button
Then I wait for "5" seconds
And I should not see a row with "test_clone" in the expanded row
And I go to the "Snapshots" tab
And I select a row "test_snapshot" in the expanded row
And I click on "Remove" button from the table actions in the expanded row
- And I check the tick box in carbon modal
+ And I confirm the resource "test_snapshot"
And I click on "Remove Snapshot" button
Then I should not see a row with "test_snapshot" in the expanded row
And I go to the "Subvolumes" tab
When I select a row "test_subvolume" in the expanded row
And I click on "Remove" button from the table actions in the expanded row
- And I check the tick box in carbon modal
+ And I confirm the resource "test_subvolume"
And I click on "Remove Subvolume" button
Then I should not see a row with "test_subvolume" in the expanded row
And I select a row "test_cephfs"
And I click on "Remove" button from the table actions
Then I should see the carbon modal
- And I check the tick box in carbon modal
+ And I confirm the resource "test_cephfs"
And I click on "Remove File System" button
Then I should not see a row with "test_cephfs"
And I go to the "Subvolume groups" tab
When I select a row "test_subvolume_group" in the expanded row
And I click on "Remove" button from the table actions in the expanded row
- And I check the tick box in carbon modal
+ And I confirm the resource "test_subvolume_group"
And I click on "Remove subvolume group" button
Then I should not see a row with "test_subvolume_group" in the expanded row
And I select a row "test_cephfs"
And I click on "Remove" button from the table actions
Then I should see the carbon modal
- And I check the tick box in carbon modal
+ And I confirm the resource "test_cephfs"
And I click on "Remove File System" button
Then I should not see a row with "test_cephfs_edit"
And I go to the "Subvolumes" tab
When I select a row "test_subvolume" in the expanded row
And I click on "Remove" button from the table actions in the expanded row
- And I check the tick box in carbon modal
+ And I confirm the resource "test_subvolume"
And I click on "Remove Subvolume" button
Then I should not see a row with "test_subvolume" in the expanded row
And I select a row "test_cephfs"
And I click on "Remove" button from the table actions
Then I should see the carbon modal
- And I check the tick box in carbon modal
+ And I confirm the resource "test_cephfs"
And I click on "Remove File System" button
Then I should not see a row with "test_cephfs_edit"
When I select a row "<hostname>"
And I click on "Remove" button from the table actions
Then I should see the carbon modal
- And I check the tick box in carbon modal
+ And I confirm the resource "<hostname>"
And I click on "Remove Host" button
And I should not see a row with "<hostname>"
cy.get('cd-service-details').within(() => {
services.checkServiceStatus('snmp-gateway');
});
+ services.clickServiceTab('snmp-gateway', 'Daemons');
services.deleteService('snmp-gateway');
});
cy.get('cd-service-details').within(() => {
services.checkServiceStatus('snmp-gateway');
});
+ services.clickServiceTab('snmp-gateway', 'Daemons');
services.deleteService('snmp-gateway');
});
section?: string,
cdsModal = false,
isMultiselect = false,
- shouldReload = false
+ shouldReload = false,
+ confirmInput = false
) {
const action: string = section === 'hosts' ? 'remove' : 'delete';
// Convert action to SentenceCase and Confirms deletion
const actionUpperCase = action.charAt(0).toUpperCase() + action.slice(1);
- cy.get('input[name="confirmation"]').click({ force: true });
+ if (confirmInput) {
+ cy.get('cds-modal input#resource_name').type(name, { force: true });
+ } else {
+ cy.get('[aria-label="confirmation"]').click({ force: true });
+ }
if (cdsModal) {
- cy.get('cds-modal button').contains(actionUpperCase).click();
+ cy.get('cds-modal button').contains(actionUpperCase).click({ force: true });
// Wait for modal to close
cy.get('cds-modal').should('not.exist');
} else {
});
it('should delete a pool', () => {
- pools.delete(poolName, null, null, true);
+ pools.delete(poolName, null, null, true, false, false, true);
});
});
});
it('should delete the pool', () => {
- pools.delete(poolName, null, null, true);
+ pools.delete(poolName, null, null, true, false, false, true);
});
});
});
});
it('should delete bucket', () => {
- buckets.delete(bucket_name, null, null, true, true);
+ buckets.delete(bucket_name, null, null, true, false, false, true);
});
it('should create bucket with object locking enabled', () => {
buckets.edit(bucket_name, BucketsPageHelper.USERS[1], true);
buckets.getDataTables().should('contain.text', BucketsPageHelper.USERS[1]);
- buckets.delete(bucket_name, null, null, true, true);
+ buckets.delete(bucket_name, null, null, true, false, false, true);
});
});
buckets.create(bucket_name, BucketsPageHelper.USERS[0]);
buckets.testInvalidEdit(bucket_name);
buckets.navigateTo();
- buckets.delete(bucket_name, null, null, true, true);
+ buckets.delete(bucket_name, null, null, true, false, false, true);
});
});
});
pages = pages;
columnIndex = {
- name: 3,
- owner: 4
+ name: 2,
+ owner: 3
};
versioningStateEnabled = 'Enabled';
@PageHelper.restrictTo(pages.index.url)
edit(name: string, new_owner: string, isLocking = false) {
- this.navigateEdit(name, false, false, null, true);
+ this.navigateEdit(name, false, false, null);
// Placement target is not allowed to be edited and should be hidden
cy.get('input[name=placement-target]').should('not.exist');
cy.get('@versioningValueCell').should('have.text', this.versioningStateEnabled);
// Disable versioning:
- this.navigateEdit(name, false, true, null, true);
+ this.navigateEdit(name, false, true, null);
cy.get('label[for=versioning_input]').click();
cy.get('input[name=versioning]').should('not.be.checked');
}
testInvalidEdit(name: string) {
- this.navigateEdit(name, false, true, null, true);
+ this.navigateEdit(name, false, true, null);
cy.get('input[name=versioning]').should('exist').and('not.be.checked');
describe('create and edit encryption configuration', () => {
it('should create configuration', () => {
configurations.create('vault', 'agent', 'transit', 'https://localhost:8080');
- configurations.getFirstTableCell('SSE_KMS').should('exist');
+ configurations.getFirstTableCell('kms').should('exist');
});
it('should edit configuration', () => {
this.selectKmsProvider(provider);
cy.get('#kms_provider').should('have.class', 'ng-valid');
this.selectAuthMethod(auth_method);
- cy.get('#auth_method').should('have.class', 'ng-valid');
+ cy.get('#auth').should('have.class', 'ng-valid');
this.selectSecretEngine(secret_engine);
cy.get('#secret_engine').should('have.class', 'ng-valid');
- cy.get('#address').type(address);
- cy.get('#address').should('have.value', address);
- cy.get('#address').should('have.class', 'ng-valid');
+ cy.get('#addr').type(address);
+ cy.get('#addr').should('have.value', address);
+ cy.get('#addr').should('have.class', 'ng-valid');
cy.contains('button', 'Submit').click();
cy.wait(500);
cy.get('cd-table').should('exist');
- this.getFirstTableCell('SSE_KMS').should('exist');
+ this.getFirstTableCell('kms').should('exist');
}
edit(new_address: string) {
- this.navigateEdit('SSE_KMS', true, false);
- cy.get('#address').clear().type(new_address);
- cy.get('#address').should('have.class', 'ng-valid');
+ this.navigateEdit('kms', true, false);
+ cy.get('#addr').clear().type(new_address);
+ cy.get('#addr').should('have.class', 'ng-valid');
cy.get('#kms_provider').should('be.disabled');
cy.contains('button', 'Submit').click();
this.getFirstTableCell(new_address);
}
private selectAuthMethod(auth_method: string) {
- return this.selectOption('auth_method', auth_method);
+ return this.selectOption('auth', auth_method);
}
private selectSecretEngine(secret_engine: string) {
});
it('should delete user', () => {
- users.delete(user_name, null, null, true, true);
+ users.delete(user_name, null, null, true, false, false, true);
});
});
@PageHelper.restrictTo(pages.index.url)
edit(name: string, new_fullname: string, new_email: string, new_maxbuckets: string) {
- this.navigateEdit(name, false, true, null, true);
+ this.navigateEdit(name, false, true, null);
// Change the full name field
cy.get('input#display_name').click().clear({ force: true }).type(new_fullname, { force: true });
.should('have.text', 'The entered value must be >= 1.');
this.navigateTo();
- this.delete(tenant + '$' + uname, null, null, true, true);
+ this.delete(tenant + '$' + uname, null, null, true, false, false, true);
}
invalidEdit() {
this.navigateTo('create');
this.create(tenant, uname, 'xxx', 'xxx@xxx', '50');
const name = tenant + '$' + uname;
- this.navigateEdit(name, false, true, null, true);
+ this.navigateEdit(name, false, true, null);
// put invalid email to make field invalid
cy.get('#email')
.should('have.text', 'The entered value must be >= 1.');
this.navigateTo();
- this.delete(tenant + '$' + uname, null, null, true, true);
+ this.delete(tenant + '$' + uname, null, null, true, false, false, true);
}
}
after(() => {
cy.login();
pools.navigateTo();
- pools.delete(poolName, null, null, true, false, true);
+ pools.delete(poolName, null, null, true, false, true, true);
});
beforeEach(() => {
});
it('should delete a user', () => {
- userMgmt.delete(user_name, null, null, true);
+ userMgmt.delete(user_name, null, null, true, false, false, true);
});
});
});
<cd-table [data]="osds"
(fetchData)="getOsdList($event)"
[columns]="columns"
- selectionType="single"
+ selectionType="multiClick"
[hasDetails]="true"
(setExpandedRow)="setExpandedRow($event)"
(updateSelection)="updateSelection($event)"
autofocus
[required]="true"
modal-primary-focus
+ ariaLabel="confirmation"
i18n>Yes, I am sure.</cds-checkbox>
</ng-container>
<ng-template #highImpactDeletion>
import { ComboBoxItem } from '../models/combo-box.model';
@Component({
- template: `<div cdDynamicInputCombobox
- [items]="[]"></div>`,
+ template: `<div cdDynamicInputCombobox [items]="[]"></div>`
})
class MockComponent {
items: ComboBoxItem[] = [{ content: 'Item1', name: 'Item1' }];
}
describe('DynamicInputComboboxDirective', () => {
-
- let component: MockComponent;
let fixture: ComponentFixture<MockComponent>;
let directive: DynamicInputComboboxDirective;
beforeEach(() => {
TestBed.configureTestingModule({
- declarations: [DynamicInputComboboxDirective, MockComponent],
+ declarations: [DynamicInputComboboxDirective, MockComponent]
}).compileComponents();
fixture = TestBed.createComponent(MockComponent);
- component = fixture.componentInstance;
directive = fixture.debugElement.children[0].injector.get(DynamicInputComboboxDirective);
fixture.detectChanges();
}));
it('should not unselect selected items', fakeAsync(() => {
- const selectedItems: ComboBoxItem[] = [{
- content: 'selectedItem',
- name: 'selectedItem',
- selected: true
- }];
+ const selectedItems: ComboBoxItem[] = [
+ {
+ content: 'selectedItem',
+ name: 'selectedItem',
+ selected: true
+ }
+ ];
directive.items = selectedItems;
expect(directive.items[0].content).toBe(selectedItems[0].content);
expect(directive.items[0].selected).toBeTruthy();
- }))
+ }));
});
ngOnInit() {
this.searchSubscription = this.searchSubject
- .pipe(
- debounceTime(DEBOUNCE_TIMER),
- distinctUntilChanged()
- )
+ .pipe(debounceTime(DEBOUNCE_TIMER), distinctUntilChanged())
.subscribe((searchString) => {
// Already selected items should be selected in the dropdown
// even if the items are updated again
return { ...item, selected };
});
- const exists = this.items.some(
- (item: ComboBoxItem) => item.content === searchString
- );
+ const exists = this.items.some((item: ComboBoxItem) => item.content === searchString);
- if (!exists) {
- this.items = this.items.concat({ content: searchString, name: searchString });
- }
- this.updatedItems.emit(this.items);
- this.combBoxService.emit({ searchString });
+ if (!exists) {
+ this.items = this.items.concat({ content: searchString, name: searchString });
+ }
+ this.updatedItems.emit(this.items);
+ this.combBoxService.emit({ searchString });
});
}