This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 9b655a4 [STREAMPIPES-476] Replace whitespaces from cypress selectors
9b655a4 is described below
commit 9b655a449bcfe6d51a0935bee1d4ac5c59f40fe2
Author: Philipp Zehnder <[email protected]>
AuthorDate: Tue Dec 7 10:10:16 2021 +0100
[STREAMPIPES-476] Replace whitespaces from cypress selectors
---
.../static-alternatives.component.html | 2 +-
.../static-alternatives.component.ts | 18 +++++++-----------
.../static-one-of-input.component.html | 2 +-
3 files changed, 9 insertions(+), 13 deletions(-)
diff --git
a/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.html
b/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.html
index 4ce775a..1cdcc53 100644
---
a/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.html
+++
b/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.html
@@ -26,7 +26,7 @@
[value]="alternative"
[checked]="alternative.selected"
[matTooltip]="alternative.description"
-
[attr.data-cy]="staticProperty.internalName.replace(' ', '_').toLowerCase() +
'-' + alternative.label.replace(' ', '_').toLowerCase()">
+
[attr.data-cy]="staticProperty.internalName.split(' ').join('_').toLowerCase()
+ '-' + alternative.label.split(' ').join('_').toLowerCase()">
<label style="font-weight: normal;">
{{alternative.label}}
</label>
diff --git
a/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.ts
b/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.ts
index 7eeb0c1..ae01e65 100644
---
a/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.ts
+++
b/ui/src/app/core-ui/static-properties/static-alternatives/static-alternatives.component.ts
@@ -16,9 +16,9 @@
*
*/
-import {ChangeDetectorRef, Component, EventEmitter, OnInit, Output} from
'@angular/core';
-import {AbstractStaticPropertyRenderer} from
"../base/abstract-static-property";
-import {StaticPropertyAlternatives} from
"../../../core-model/gen/streampipes-model";
+import { ChangeDetectorRef, Component, EventEmitter, OnInit, Output } from
'@angular/core';
+import { AbstractStaticPropertyRenderer } from
'../base/abstract-static-property';
+import { StaticPropertyAlternatives } from
'../../../core-model/gen/streampipes-model';
@Component({
selector: 'app-static-alternatives',
@@ -29,9 +29,9 @@ export class StaticAlternativesComponent
extends AbstractStaticPropertyRenderer<StaticPropertyAlternatives>
implements OnInit {
- @Output() inputEmitter: EventEmitter<Boolean> = new
EventEmitter<Boolean>();
+ @Output() inputEmitter: EventEmitter<boolean> = new
EventEmitter<boolean>();
- private errorMessage = "Please select a option";
+ private errorMessage = 'Please select a option';
constructor(private changeDetectorRef: ChangeDetectorRef) {
super();
@@ -42,13 +42,9 @@ export class StaticAlternativesComponent
radioSelectionChange(event) {
this.staticProperty.alternatives.forEach(alternative => {
- if (alternative.elementId == event.value.elementId) {
- alternative.selected = true;
- } else {
- alternative.selected = false;
- }
+ alternative.selected = alternative.elementId ===
event.value.elementId;
});
this.changeDetectorRef.detectChanges();
}
-}
\ No newline at end of file
+}
diff --git
a/ui/src/app/core-ui/static-properties/static-one-of-input/static-one-of-input.component.html
b/ui/src/app/core-ui/static-properties/static-one-of-input/static-one-of-input.component.html
index fc31acc..fcdde3f 100644
---
a/ui/src/app/core-ui/static-properties/static-one-of-input/static-one-of-input.component.html
+++
b/ui/src/app/core-ui/static-properties/static-one-of-input/static-one-of-input.component.html
@@ -26,7 +26,7 @@
[value]="option"
(click)="select(option.elementId)"
[checked]="option.selected"
-
[attr.data-cy]="staticProperty.internalName.replace(' ', '_').toLowerCase() +
'-' + option.name.replace(' ', '_').toLowerCase()">
+
[attr.data-cy]="staticProperty.internalName.split(' ').join('_').toLowerCase()
+ '-' + option.name.split(' ').join('_').toLowerCase()">
<label style="font-weight: normal">
{{option.name}}
</label>