Skip to content

Commit

Permalink
Revert "Add hidden select for e2e tests"
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeY0846 committed Oct 19, 2024
1 parent 96df4f5 commit 62fc52f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,8 @@ <h2 class="question-details"><b>Question {{ model.questionNumber }}: </b>{{ mode
<b>{{ getRecipientName(recipientSubmissionFormModel.recipientIdentifier) }} </b> <span>({{ model.recipientType | recipientTypeName:model.giverType }})</span>
</div>
<div class="row evaluee-select align-items-center" *ngIf="formMode === QuestionSubmissionFormMode.FLEXIBLE_RECIPIENT">
<select id="recipient-dropdown-qn-{{ model.questionNumber }}-idx-{{ i }}" class="form-control form-select fw-bold col" [ngModel]="recipientSubmissionFormModel.recipientIdentifier"
(ngModelChange)="triggerRecipientIdentifierChange(i, $event)"
[disabled]="isFormsDisabled"
[attr.aria-label]="'Select recipient dropdown question ' + model.questionNumber + ' index ' + i" hidden>
<option value=""></option>
<ng-container *ngFor="let recipient of model.recipientList">
<option *ngIf="!isRecipientSelected(recipient) || recipientSubmissionFormModel.recipientIdentifier === recipient.recipientIdentifier" [ngValue]="recipient.recipientIdentifier">{{ getSelectionOptionLabel(recipient) }}</option>
</ng-container>
</select>
<div class="input-selection-wrapper col" id="recipient-dropdown-input-qn-{{ model.questionNumber }}-idx-{{ i }}">
<input type="text" class="form-control form-select fw-bold"
<div class="input-selection-wrapper col">
<input type="text" class="form-control form-select fw-bold" id="recipient-dropdown-qn-{{ model.questionNumber }}-idx-{{ i }}"
[(ngModel)]="searchNameTexts[i]"
(ngModelChange)="triggerSelectInputChange(i)"
[disabled]="isFormsDisabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,8 @@ export class QuestionSubmissionFormComponent implements DoCheck {
* Triggers the changes of the recipient selection
*/
triggerRecipientIdentifierChange(index: number, data: any): void {
const recipient = this.model.recipientList.find((r) => r.recipientIdentifier === data);
if (recipient) {
this.searchNameTexts[index] = this.getSelectionOptionLabel(recipient);
this.feedbackRecipients[index] = recipient;
this.triggerRecipientSubmissionFormChange(index, 'recipientIdentifier', data);
}
this.searchNameTexts[index] = '';
this.triggerRecipientSubmissionFormChange(index, 'recipientIdentifier', data);
}

/**
Expand Down

0 comments on commit 62fc52f

Please sign in to comment.