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 333x                                                                
<div class="cart-summary">
  <button
    type="button"
    class="btn btn-link btn-link-action"
    (click)="isCollapsed = !isCollapsed"
    data-testing-id="promo-collapse-link"
  >
    {{ 'shopping_cart.promotional_code.heading' | translate }}
  </button>
 
  <ish-error-message [error]="promotionError$ | async" [toast]="toast" />
 
  <ish-success-message
    *ngIf="displaySuccessMessage"
    message="shopping_cart.promotion.qualified_promo.text"
    [toast]="toast"
  />
 
  <div class="form-inline" [ngbCollapse]="isCollapsed" data-testing-id="promo-code-form">
    <input
      [formControl]="codeInput"
      (keydown.enter)="submitPromotionCode()"
      class="form-control"
      type="text"
      [maxlength]="codeMaxLength"
      [placeholder]="'shopping_cart.promotional_code.label' | translate"
    />
    <button type="button" class="btn btn-secondary" [disabled]="!codeInput.valid" (click)="submitPromotionCode()">
      {{ 'shopping_cart.promotion.apply.button.label' | translate }}
    </button>
  </div>
</div>