Skip to content

Fix(subscribable banner): more explicit testing

What does this MR do?

This MR is a follow-up to this MR: !51705 (merged) creating more explicit tests for the change.

Screenshots (strongly suggested)

Renew Upgrade
Screen_Shot_2021-01-18_at_14.06.31 Screen_Shot_2021-01-18_at_14.06.19
Self managed
Screen_Shot_2021-01-21_at_12.07.19

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Requires:

  • Customers app set up an running

  • bundle exec rails c and run:

> Feature.enable(:subscribable_subscription_banner)
> group = Group.find_by_full_path('h5bp')
> subscription = GitlabSubscription.where(namespace_id: group.id)[0]
> subscription.update(end_date: Date.current - 1.week, trial_ends_on: Date.current - 1.week)
  • Navigate to http://localhost:3000/h5bp and click "Renew" in the banner (make sure you are already logged into the customers' app!)
  • It should display the renew page with your subscription
> subscription.update(end_date: Date.current - 3.week, trial_ends_on: Date.current - 3.week)
  • Navigate to http://localhost:3000/h5bp and click "Upgrade"
  • It should navigate you to the customers' app general /subscriptions page

In order to test the user:

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to: https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/2499

Merge request reports