All files / src/app/shared/components/basket/basket-promotion-code basket-promotion-code.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 373x                                                                        
<div class="cart-summary">
  <button
    type="button"
    id="promotion-code-button"
    class="btn btn-link btn-content-toggle"
    (click)="isCollapsed = !isCollapsed"
    [attr.aria-expanded]="!isCollapsed"
    aria-controls="promo-code-input"
    data-testing-id="promo-collapse-link"
  >
    {{ 'shopping_cart.promotional_code.heading' | translate
    }}<i class="bi float-end" [ngClass]="isCollapsed ? 'bi-chevron-down' : 'bi-chevron-up'"></i>
  </button>
 
  <ish-error-message [error]="promotionError$ | async" [toast]="toast" />
 
  @if (displaySuccessMessage) {
  <ish-success-message message="shopping_cart.promotion.qualified_promo.text" [toast]="toast" />
  }
 
  <div id="promo-code-input" class="promo-code-input" [ngbCollapse]="isCollapsed" data-testing-id="promo-code-form">
    <input
      [formControl]="codeInput"
      (keyup.enter)="submitPromotionCode()"
      class="form-control w-auto"
      type="text"
      [maxlength]="codeMaxLength"
      [attr.aria-label]="'shopping_cart.promotional_code.label' | translate"
      [placeholder]="'shopping_cart.promotional_code.label' | translate"
      aria-labelledby="promotion-code-button"
    />
    <button type="button" class="btn btn-secondary" [disabled]="!codeInput.valid" (click)="submitPromotionCode()">
      {{ 'shopping_cart.promotion.apply.button.label' | translate }}
    </button>
  </div>
</div>