You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2021/06/17 09:11:52 UTC
[incubator-streampipes] branch STREAMPIPES-380 updated: Add cypress
ids for automated end2end tests
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-380
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/STREAMPIPES-380 by this push:
new 7621adc Add cypress ids for automated end2end tests
7621adc is described below
commit 7621adca3f3cc2a25384a5a9bd4ac6f90652b334
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Jun 17 11:11:22 2021 +0200
Add cypress ids for automated end2end tests
---
.../format-configuration/format-configuration.component.html | 4 +++-
.../connect/components/format-item/format-item.component.html | 2 +-
.../connect/components/new-adapter/new-adapter.component.ts | 4 ++--
.../event-property-row/event-property-row.component.html | 3 ++-
.../schema-editor/event-schema/event-schema.component.html | 2 +-
.../edit-event-property/edit-event-property.component.html | 11 +++++++++--
.../dialog/confirm-dialog/confirm-dialog.component.html | 2 +-
.../static-any-input/static-any-input.component.html | 5 ++---
.../static-free-input/static-free-input.component.html | 5 +++--
.../core-ui/static-properties/static-property.component.html | 5 ++++-
.../components/file-overview/file-overview.component.html | 2 +-
.../dialog/file-upload/file-upload-dialog.component.html | 5 +++--
ui/src/app/files/files.component.html | 4 +++-
13 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/ui/src/app/connect/components/format-configuration/format-configuration.component.html b/ui/src/app/connect/components/format-configuration/format-configuration.component.html
index bb858eb..d453440 100644
--- a/ui/src/app/connect/components/format-configuration/format-configuration.component.html
+++ b/ui/src/app/connect/components/format-configuration/format-configuration.component.html
@@ -35,7 +35,9 @@
<div fxLayoutAlign="end">
<button class="mat-basic" mat-raised-button (click)="removeSelection()">Cancel</button>
<button class="mat-basic stepper-button" mat-raised-button (click)="goBack()">Back</button>
- <button class="stepper-button" id="format-selection-next-button"
+ <button class="stepper-button"
+ id="format-selection-next-button"
+ data-cy="sp-format-selection-next-button"
[disabled]="!formatConfigurationValid"
(click)="clickNext()"
color="primary" mat-raised-button>
diff --git a/ui/src/app/connect/components/format-item/format-item.component.html b/ui/src/app/connect/components/format-item/format-item.component.html
index ba288af..0edf190 100644
--- a/ui/src/app/connect/components/format-item/format-item.component.html
+++ b/ui/src/app/connect/components/format-item/format-item.component.html
@@ -16,6 +16,6 @@
~
-->
-<div id="{{format.name.split(' ').join('_').toLowerCase()}}" *ngIf="!$any(format).edit || !hasConfig" class="format-box" (click)="formatEditable()" [ngClass]="{selectedItem: isSelected()}" fxFlex="100" fxLayout="column">
+<div [attr.data-cy]="format.name.split(' ').join('_').toLowerCase()" *ngIf="!$any(format).edit || !hasConfig" class="format-box" (click)="formatEditable()" [ngClass]="{selectedItem: isSelected()}" fxFlex="100" fxLayout="column">
<div class="format-label"> {{format.name}} </div>
</div>
\ No newline at end of file
diff --git a/ui/src/app/connect/components/new-adapter/new-adapter.component.ts b/ui/src/app/connect/components/new-adapter/new-adapter.component.ts
index 897ad81..b1de328 100644
--- a/ui/src/app/connect/components/new-adapter/new-adapter.component.ts
+++ b/ui/src/app/connect/components/new-adapter/new-adapter.component.ts
@@ -153,8 +153,8 @@ export class NewAdapterComponent implements OnInit, AfterViewInit {
// Timeout is needed for stepper to work correctly. Without the stepper is frozen when initializing with
// step 2. Can be removed when a better solution is found.
setTimeout(() => {
- this.goForward(this.myStepper);
- this.goForward(this.myStepper);
+ this.goForward();
+ this.goForward();
}, 1);
this.fromTemplate = true;
diff --git a/ui/src/app/connect/components/schema-editor/event-property-row/event-property-row.component.html b/ui/src/app/connect/components/schema-editor/event-property-row/event-property-row.component.html
index cb58759..fe6966d 100644
--- a/ui/src/app/connect/components/schema-editor/event-property-row/event-property-row.component.html
+++ b/ui/src/app/connect/components/schema-editor/event-property-row/event-property-row.component.html
@@ -44,7 +44,8 @@
<div fxFlex="0 1 auto" fxLayoutAlign="center center"
*ngIf="isNested || isPrimitive || isList">
<button [disabled]="!isEditable" color="primary" mat-button
- (click)="openEditDialog(node.data)">
+ (click)="openEditDialog(node.data)"
+ [attr.data-cy]="'edit-' + label">
<mat-icon>edit</mat-icon>
</button>
</div>
diff --git a/ui/src/app/connect/components/schema-editor/event-schema/event-schema.component.html b/ui/src/app/connect/components/schema-editor/event-schema/event-schema.component.html
index 4111397..aa639a1 100644
--- a/ui/src/app/connect/components/schema-editor/event-schema/event-schema.component.html
+++ b/ui/src/app/connect/components/schema-editor/event-schema/event-schema.component.html
@@ -65,6 +65,6 @@
<button class="mat-basic" mat-raised-button (click)="removeSelection()">Cancel</button>
<button class="mat-basic stepper-button" mat-raised-button (click)="goBack()">Back</button>
<button class="stepper-button" id="event-schema-next-button"
- (click)="clickNext()" color="primary" mat-raised-button>Next
+ (click)="clickNext()" data-cy="sp-event-schema-next-button" color="primary" mat-raised-button>Next
</button>
</div>
diff --git a/ui/src/app/connect/dialog/edit-event-property/edit-event-property.component.html b/ui/src/app/connect/dialog/edit-event-property/edit-event-property.component.html
index cf90f88..823516b 100644
--- a/ui/src/app/connect/dialog/edit-event-property/edit-event-property.component.html
+++ b/ui/src/app/connect/dialog/edit-event-property/edit-event-property.component.html
@@ -58,7 +58,9 @@
</mat-form-field>
<div *ngIf="!isEventPropertyNested">
<mat-checkbox name="timestampCheckbox"
- (change)="editTimestampDomainProperty($event.checked)" [checked]="isTimestampProperty">
+ (change)="editTimestampDomainProperty($event.checked)"
+ [checked]="isTimestampProperty"
+ data-cy="sp-mark-as-timestamp">
Mark as timestamp
</mat-checkbox>
</div>
@@ -80,5 +82,10 @@
<mat-dialog-actions>
<button mat-button mat-raised-button class="mat-basic" mat-dialog-close>Close</button>
- <button mat-button mat-raised-button color="primary" [disabled]="isSaveBtnEnabled" (click)="save(); isSaveBtnEnabled = false">Save</button>
+ <button mat-button mat-raised-button color="primary"
+ [disabled]="isSaveBtnEnabled"
+ (click)="save();
+ isSaveBtnEnabled = false"
+ data-cy="sp-save-edit-property">
+ Save</button>
</mat-dialog-actions>
diff --git a/ui/src/app/core-ui/dialog/confirm-dialog/confirm-dialog.component.html b/ui/src/app/core-ui/dialog/confirm-dialog/confirm-dialog.component.html
index 3cd9385..d7a2bdf 100644
--- a/ui/src/app/core-ui/dialog/confirm-dialog/confirm-dialog.component.html
+++ b/ui/src/app/core-ui/dialog/confirm-dialog/confirm-dialog.component.html
@@ -23,6 +23,6 @@
</div>
<div fxFlex="100" fxLayoutAlign="end center" class="footer">
<button mat-button (click)="onCancel()" *ngIf="data.confirmAndCancel">{{data.cancelTitle}}</button>
- <button mat-button (click)="onOk()" cdkFocusInitial>{{data.okTitle}}</button>
+ <button mat-button (click)="onOk()" cdkFocusInitial data-cy="confirm-delete">{{data.okTitle}}</button>
</div>
</div>
\ No newline at end of file
diff --git a/ui/src/app/core-ui/static-properties/static-any-input/static-any-input.component.html b/ui/src/app/core-ui/static-properties/static-any-input/static-any-input.component.html
index c43d8bc..a51e39a 100644
--- a/ui/src/app/core-ui/static-properties/static-any-input/static-any-input.component.html
+++ b/ui/src/app/core-ui/static-properties/static-any-input/static-any-input.component.html
@@ -18,18 +18,17 @@
<div id="formWrapper" fxFlex="100" fxLayout="column">
<div *ngIf="!staticProperty.horizontalRendering" fxLayout="column">
- <mat-checkbox *ngFor="let option of staticProperty.options" [(ngModel)]="option.selected" style="margin-left: 10px;">
+ <mat-checkbox *ngFor="let option of staticProperty.options" [(ngModel)]="option.selected" style="margin-left: 10px;" [attr.data-cy]="fieldName">
{{option.name}}
</mat-checkbox>
</div>
-
<div *ngIf="staticProperty.horizontalRendering">
<mat-form-field style="width: 100%">
<mat-select multiple>
<mat-option *ngFor="let option of staticProperty.options" [value]="option.elementId"
(click)="select(option.elementId)">
- <label style="font-weight: normal">
+ <label style="font-weight: normal" >
{{option.name}}
</label>
</mat-option>
diff --git a/ui/src/app/core-ui/static-properties/static-free-input/static-free-input.component.html b/ui/src/app/core-ui/static-properties/static-free-input/static-free-input.component.html
index b8ff16b..2b5db76 100644
--- a/ui/src/app/core-ui/static-properties/static-free-input/static-free-input.component.html
+++ b/ui/src/app/core-ui/static-properties/static-free-input/static-free-input.component.html
@@ -18,11 +18,12 @@
<div [formGroup]="parentForm" fxFlex="100" fxLayout="column">
<div fxFlex fxLayout="row" *ngIf="!staticProperty.valueSpecification && !staticProperty.multiLine">
- <mat-form-field fxFlex>
+ <mat-form-field fxFlex >
<input formControlName="{{fieldName}}" fxFlex
matInput
[placeholder]="staticProperty.label"
- required (blur)="emitUpdate()">
+ required (blur)="emitUpdate()"
+ [attr.data-cy]="fieldName">
<mat-error *ngIf="!fieldValid">
{{errorMessage}}
diff --git a/ui/src/app/core-ui/static-properties/static-property.component.html b/ui/src/app/core-ui/static-properties/static-property.component.html
index c375533..964413e 100644
--- a/ui/src/app/core-ui/static-properties/static-property.component.html
+++ b/ui/src/app/core-ui/static-properties/static-property.component.html
@@ -81,7 +81,10 @@
<app-static-any-input
*ngIf="isAnyStaticProperty(staticProperty) && !isRuntimeResolvableAnyStaticProperty(staticProperty)"
(inputEmitter)="valueChange($event)"
- [staticProperty]="staticProperty"></app-static-any-input>
+ [fieldName]="fieldName"
+ [staticProperty]="staticProperty">
+
+ </app-static-any-input>
<app-static-one-of-input
*ngIf="isOneOfStaticProperty(staticProperty) && !isRuntimeResolvableOneOfStaticProperty(staticProperty)"
diff --git a/ui/src/app/files/components/file-overview/file-overview.component.html b/ui/src/app/files/components/file-overview/file-overview.component.html
index af32a8b..858bd68 100644
--- a/ui/src/app/files/components/file-overview/file-overview.component.html
+++ b/ui/src/app/files/components/file-overview/file-overview.component.html
@@ -41,7 +41,7 @@
<th mat-header-cell *matHeaderCellDef> Action</th>
<td mat-cell *matCellDef="let fileMetadata">
<button color="primary" mat-button mat-icon-button matTooltip="Delete file" matTooltipPosition="above"
- (click)="deleteFile(fileMetadata)">
+ (click)="deleteFile(fileMetadata)" data-cy="delete">
<i class="material-icons">delete</i>
</button>
</td>
diff --git a/ui/src/app/files/dialog/file-upload/file-upload-dialog.component.html b/ui/src/app/files/dialog/file-upload/file-upload-dialog.component.html
index 2ec920f..ad951dc 100644
--- a/ui/src/app/files/dialog/file-upload/file-upload-dialog.component.html
+++ b/ui/src/app/files/dialog/file-upload/file-upload-dialog.component.html
@@ -24,7 +24,8 @@
<mat-form-field style="width: 95%" (click)="fileInput.click();">
<input matInput placeholder="File" disabled (value)="fileName">
<input #fileInput type="file" style="display:none;"
- (change)="handleFileInput($event.target.files)">
+ (change)="handleFileInput($event.target.files)"
+ data-cy="sp-file-management-file-input">
<div>
{{fileName}}
<mat-progress-bar mode="determinate" value="{{uploadStatus}}" *ngIf="uploadStatus > 0"></mat-progress-bar>
@@ -43,7 +44,7 @@
</div>
<mat-divider></mat-divider>
<div class="sp-dialog-actions">
- <button mat-button mat-raised-button color="primary" (click)="store()" style="margin-right:10px;">
+ <button mat-button mat-raised-button color="primary" (click)="store()" data-cy="sp-file-management-store-file" style="margin-right:10px;">
Store file
</button>
<button mat-button mat-raised-button class="mat-basic" (click)="cancel()" style="margin-right:10px;">
diff --git a/ui/src/app/files/files.component.html b/ui/src/app/files/files.component.html
index 1dc2825..4cb736d 100644
--- a/ui/src/app/files/files.component.html
+++ b/ui/src/app/files/files.component.html
@@ -32,7 +32,9 @@
<div class="add-options-item" fxLayoutAlign="start center" fxLayout="row" style="padding-left:5px;">
<div fxFlex="100" fxLayout="row">
<button mat-button mat-raised-button color="primary"
- (click)="openFileUploadDialog()" class="mr-10">
+ (click)="openFileUploadDialog()"
+ data-cy="sp-open-file-upload-dialog"
+ class="mr-10">
<i class="material-icons">cloud_upload</i>
Upload new file
</button>