Skip to content

Commit

Permalink
Merge pull request #5567 from deNBI/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dweinholz authored Apr 3, 2023
2 parents 087717e + fdb1834 commit 9d00ece
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 33 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@denbi/cloud-portal-webapp",
"version": "4.664.0",
"version": "4.666.0",
"description": "de.NBI Cloud Portal",
"scripts": {
"ng": "ng serve",
Expand Down Expand Up @@ -49,7 +49,7 @@
"core-js": "3.29.1",
"css-loader": "6.7.3",
"cssnano": "6.0.0",
"d3": "7.8.3",
"d3": "7.8.4",
"eslint": "^8.28.0",
"export-to-csv": "0.2.1",
"express": "4.18.2",
Expand Down Expand Up @@ -106,7 +106,7 @@
"eslint": "^8.28.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "40.1.0",
"eslint-plugin-jsdoc": "40.1.1",
"eslint-plugin-no-null": "latest",
"eslint-plugin-prefer-arrow": "1.2.3",
"exports-loader": "4.0.0",
Expand Down
3 changes: 1 addition & 2 deletions src/app/projectmanagement/overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ export class OverviewComponent extends ApplicationBaseClassComponent implements
this.getUserinfo();
this.getListOfFlavors();
this.getListOfTypes();
this.getDois();
});
}

Expand Down Expand Up @@ -235,7 +234,7 @@ export class OverviewComponent extends ApplicationBaseClassComponent implements
this.startUpdateCreditUsageLoop();
}
}

this.getDois();
this.isLoaded = true;
},
(error: any): void => {
Expand Down
12 changes: 6 additions & 6 deletions src/app/vo_manager/voOverview.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@
style="margin-left: 5px; margin-bottom: 5px"
type="button"
class="btn btn-danger"
[id]="'show_terminate_' + project?.project_application_id"
[attr.data-test-id]="'show_terminate_' + project?.perun_name"
[id]="'show_terminate_' + project?.project_application_shortname"
[attr.data-test-id]="'show_terminate_' + project?.project_application_shortname"
(click)="selectedProject = project; terminateModal.show()"
*ngIf="!(project | hasstatusinlist : application_states.WAIT_FOR_TERMINATION_FM)"
>
Expand All @@ -441,8 +441,8 @@
type="button"
disabled
class="btn btn-warning"
[id]="'show_terminate_' + project?.project_application_id"
[attr.data-test-id]="'show_terminate_' + project?.project_application_id"
[id]="'show_terminate_' + project?.project_application_shortname"
[attr.data-test-id]="'show_terminate_' + project?.project_application_shortname"
(click)="selectedProject = project; terminateModal.show()"
*ngIf="project | hasstatusinlist : application_states.WAIT_FOR_TERMINATION_FM"
>
Expand All @@ -452,7 +452,7 @@
style="margin-left: 5px"
type="button"
class="btn btn-info"
[id]="'set_protected_' + project?.project_application_perun_id"
[id]="'set_protected_' + project?.project_application_shortname"
(click)="setProtected(project, true); notificationModal.show()"
*ngIf="!(project | hasstatusinlist : application_states.PROTECTED)"
>
Expand All @@ -462,7 +462,7 @@
style="margin-left: 5px"
type="button"
class="btn btn-info"
[id]="'set_unprotected_' + project?.project_application_perun_id"
[id]="'set_unprotected_' + project?.project_application_shortname"
(click)="setProtected(project, false); notificationModal.show()"
*ngIf="project | hasstatusinlist : application_states.PROTECTED"
>
Expand Down
18 changes: 14 additions & 4 deletions tests/page_objects/vo_overview.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,17 @@ export class VoOverviewPage {
await this.goto();
await this.filterForProjects(project_name);

const project_count: number = await this.page.locator('button >> text=Terminate Project').count();
const project_count: number = await this.page
.locator(Util.by_data_test_id_str_prefix(this.SHOW_TERMINATE_PREFIX + Util.OPENSTACK_APPLICATION_NAME))
.count();
console.log(`Terminating ${project_count} openstack projects with name ${project_name}`);
// eslint-disable-next-line no-plusplus
for (let i = 0; i < project_count; i++) {
// eslint-disable-next-line no-await-in-loop
await this.page.locator('button >> text=Terminate Project').first().click();
await this.page
.locator(Util.by_data_test_id_str_prefix(this.SHOW_TERMINATE_PREFIX + Util.OPENSTACK_APPLICATION_NAME))
.first()
.click();
// eslint-disable-next-line no-await-in-loop
await this.page.locator(Util.by_data_test_id_str(this.TERMINATE_PROJECT_BTN)).first().click();

Expand All @@ -67,12 +72,17 @@ export class VoOverviewPage {
await this.goto();
await this.filterForProjects(project_name);
await this.page.waitForTimeout(7500);
const project_count: number = await this.page.locator('button >> text=Terminate Project').count();
const project_count: number = await this.page
.locator(Util.by_data_test_id_str_prefix(this.SHOW_TERMINATE_PREFIX + Util.SIMPLE_VM_APPLICATION_NAME))
.count();
console.log(`Terminating ${project_count} simplevm projects with name ${project_name}`);
// eslint-disable-next-line no-plusplus
for (let i = 0; i < project_count; i++) {
// eslint-disable-next-line no-await-in-loop
await this.page.locator('button >> text=Terminate Project').first().click();
await this.page
.locator(Util.by_data_test_id_str_prefix(this.SHOW_TERMINATE_PREFIX + Util.SIMPLE_VM_APPLICATION_NAME))
.first()
.click();
// eslint-disable-next-line no-await-in-loop
await this.page.locator(Util.by_data_test_id_str(this.TERMINATE_PROJECT_BTN)).first().click();

Expand Down
3 changes: 2 additions & 1 deletion tests/page_objects/workshop_instances.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export class WorkshopInstancesPage {
console.log('Selecting project');
await this.page.waitForTimeout(2000);
await this.page.locator(Util.by_data_test_id_str(this.PROJECT_SELECT)).isVisible();
await this.page.selectOption(Util.by_data_test_id_str(this.PROJECT_SELECT), { label: project_name });
console.log(`Should select ${project_name}`);
await this.page.selectOption(Util.by_data_test_id_str(this.PROJECT_SELECT), { index: 0 });
console.log('Project selected');
}
async selectWorkshop(workshop_name: string = Util.WORKSHOP_NAME) {
Expand Down
3 changes: 2 additions & 1 deletion tests/page_objects/workshop_overview.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export class WorkshopOverviewPage {
console.log('Selecting project');
await this.page.waitForTimeout(2000);
await this.page.locator(Util.by_data_test_id_str(this.PROJECT_SELECT)).isVisible();
await this.page.selectOption(Util.by_data_test_id_str(this.PROJECT_SELECT), { label: project_name });
console.log(`should select ${project_name}`);
await this.page.locator(Util.by_data_test_id_str(this.PROJECT_SELECT)).selectOption({ index: 0 });
await this.page.locator(Util.by_data_test_id_str(this.NEW_WORKSHOP_BUTTON)).isVisible();
console.log('Project selected');
}
Expand Down

0 comments on commit 9d00ece

Please sign in to comment.