diff --git a/ee/app/assets/javascripts/subscriptions/new/components/order_summary.vue b/ee/app/assets/javascripts/subscriptions/new/components/order_summary.vue index 6cd1948b67afae363a243f53260babf398464628..2d2e31088833df2edb8a84d84bd0fed82e8a4aa0 100644 --- a/ee/app/assets/javascripts/subscriptions/new/components/order_summary.vue +++ b/ee/app/assets/javascripts/subscriptions/new/components/order_summary.vue @@ -220,8 +220,8 @@ export default { </template> </summary-details> </div> - <div class="gl-display-none gl-lg-display-block" data-qa-selector="order_summary"> - <h4 class="gl-my-0 gl-font-lg" data-qa-selector="title">{{ titleWithName }}</h4> + <div class="gl-display-none gl-lg-display-block" data-testid="order-summary"> + <h4 class="gl-my-0 gl-font-lg" data-testid="title">{{ titleWithName }}</h4> <summary-details class="gl-mt-6"> <template v-if="isEligibleToUsePromoCode" #promo-code> <promo-code-input diff --git a/ee/app/assets/javascripts/subscriptions/new/components/order_summary/summary_details.vue b/ee/app/assets/javascripts/subscriptions/new/components/order_summary/summary_details.vue index 6130f41d7f076c84d1b8ef4e72467e4da6093521..88451fa0cb879b9b6e7c0616378a85ec1a7d1379 100644 --- a/ee/app/assets/javascripts/subscriptions/new/components/order_summary/summary_details.vue +++ b/ee/app/assets/javascripts/subscriptions/new/components/order_summary/summary_details.vue @@ -54,14 +54,14 @@ export default { <template> <div> <div class="gl-display-flex gl-justify-content-space-between gl-font-weight-bold gl-mb-3"> - <div data-testid="selected-plan" data-qa-selector="selected_plan"> + <div data-testid="selected-plan"> {{ sprintf($options.i18n.selectedPlanText, { selectedPlanText }) }} <span v-if="usersPresent" data-testid="number-of-users">{{ sprintf($options.i18n.numberOfUsers, { numberOfUsers }) }}</span> </div> <gl-loading-icon v-if="isInvoicePreviewLoading" inline class="gl-my-auto gl-ml-3" /> - <div v-else class="gl-ml-3" data-testid="amount" data-qa-selector="total"> + <div v-else class="gl-ml-3" data-testid="amount"> {{ formatAmount(totalExVat, showAmount) }} </div> </div> @@ -131,7 +131,7 @@ export default { <div class="gl-display-flex gl-justify-content-space-between gl-font-lg gl-font-weight-bold"> <div>{{ $options.i18n.total }}</div> <gl-loading-icon v-if="isInvoicePreviewLoading" inline class="gl-my-auto" /> - <div v-else data-testid="total-amount" data-qa-selector="total_amount"> + <div v-else data-testid="total-amount"> {{ formatAmount(totalAmount, showAmount) }} </div> </div> diff --git a/qa/lib/gitlab/page/subscriptions/new.rb b/qa/lib/gitlab/page/subscriptions/new.rb index 6e3cb45fd29fb1782fed2e5417a5552c297a2b74..95e5028f9853f0c8c3d75e3093d25e53c7693435 100644 --- a/qa/lib/gitlab/page/subscriptions/new.rb +++ b/qa/lib/gitlab/page/subscriptions/new.rb @@ -38,8 +38,8 @@ class New < Chemlab::Page button :confirm_purchase, text: /Confirm purchase/ # Order Summary - div :selected_plan, 'data-testid': 'selected-plan' - div :order_total, 'data-testid': 'total-amount' + div :selected_plan + div :total_amount end end end diff --git a/qa/lib/gitlab/page/subscriptions/new.stub.rb b/qa/lib/gitlab/page/subscriptions/new.stub.rb index 93680ab95e031ec1fe9becd8d50dc93bd6c50756..a7f5d689838944e12b2965a5352b407d83825c0f 100644 --- a/qa/lib/gitlab/page/subscriptions/new.stub.rb +++ b/qa/lib/gitlab/page/subscriptions/new.stub.rb @@ -86,6 +86,40 @@ def number_of_users? # This is a stub, used for indexing. The method is dynamically generated. end + # @note Defined as +text_field :quantity+ + # @return [String] The text content or value of +quantity+ + def quantity + # This is a stub, used for indexing. The method is dynamically generated. + end + + # Set the value of quantity + # @example + # Gitlab::Page::Subscriptions::New.perform do |new| + # new.quantity = 'value' + # end + # @param value [String] The value to set. + def quantity=(value) + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Subscriptions::New.perform do |new| + # expect(new.quantity_element).to exist + # end + # @return [Watir::TextField] The raw +TextField+ element + def quantity_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Subscriptions::New.perform do |new| + # expect(new).to be_quantity + # end + # @return [Boolean] true if the +quantity+ element is present on the page + def quantity? + # This is a stub, used for indexing. The method is dynamically generated. + end + # @note Defined as +button :continue_to_billing+ # Clicks +continue_to_billing+ def continue_to_billing @@ -539,6 +573,54 @@ def confirm_purchase_element def confirm_purchase? # This is a stub, used for indexing. The method is dynamically generated. end + + # @note Defined as +div :selected_plan+ + # @return [String] The text content or value of +selected_plan+ + def selected_plan + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Subscriptions::New.perform do |new| + # expect(new.selected_plan_element).to exist + # end + # @return [Watir::Div] The raw +Div+ element + def selected_plan_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Subscriptions::New.perform do |new| + # expect(new).to be_selected_plan + # end + # @return [Boolean] true if the +selected_plan+ element is present on the page + def selected_plan? + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @note Defined as +div :total_amount+ + # @return [String] The text content or value of +total_amount+ + def total_amount + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Subscriptions::New.perform do |new| + # expect(new.total_amount_element).to exist + # end + # @return [Watir::Div] The raw +Div+ element + def total_amount_element + # This is a stub, used for indexing. The method is dynamically generated. + end + + # @example + # Gitlab::Page::Subscriptions::New.perform do |new| + # expect(new).to be_total_amount + # end + # @return [Boolean] true if the +total_amount+ element is present on the page + def total_amount? + # This is a stub, used for indexing. The method is dynamically generated. + end end end end