Skip to content

Commit

Permalink
Merge branch 'master' into THREESCALE-10245-access-tokens-UI
Browse files Browse the repository at this point in the history
  • Loading branch information
jlledom authored Jan 23, 2025
2 parents faefd30 + 15d75c5 commit 665c6d7
Show file tree
Hide file tree
Showing 14 changed files with 553 additions and 716 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ gem 'aws-sdk-s3', '~> 1'
gem 'dotenv-rails', '~> 2.7'
gem 'rails', '~> 7.0.0'

# Fixing "uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger"
# that fails after upgrading to 1.3.5. Can be removed after upgrading to Rails 7.1
gem 'concurrent-ruby', '1.3.4'

gem 'mail', '~> 2.8.1'

gem "activejob-uniqueness"
Expand Down
115 changes: 58 additions & 57 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,55 +72,55 @@ GEM
activesupport (>= 3.2.19)
Ascii85 (1.1.0)
RedCloth (4.3.3)
actioncable (7.0.8.6)
actionpack (= 7.0.8.6)
activesupport (= 7.0.8.6)
actioncable (7.0.8.7)
actionpack (= 7.0.8.7)
activesupport (= 7.0.8.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8.6)
actionpack (= 7.0.8.6)
activejob (= 7.0.8.6)
activerecord (= 7.0.8.6)
activestorage (= 7.0.8.6)
activesupport (= 7.0.8.6)
actionmailbox (7.0.8.7)
actionpack (= 7.0.8.7)
activejob (= 7.0.8.7)
activerecord (= 7.0.8.7)
activestorage (= 7.0.8.7)
activesupport (= 7.0.8.7)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8.6)
actionpack (= 7.0.8.6)
actionview (= 7.0.8.6)
activejob (= 7.0.8.6)
activesupport (= 7.0.8.6)
actionmailer (7.0.8.7)
actionpack (= 7.0.8.7)
actionview (= 7.0.8.7)
activejob (= 7.0.8.7)
activesupport (= 7.0.8.7)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8.6)
actionview (= 7.0.8.6)
activesupport (= 7.0.8.6)
actionpack (7.0.8.7)
actionview (= 7.0.8.7)
activesupport (= 7.0.8.7)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8.6)
actionpack (= 7.0.8.6)
activerecord (= 7.0.8.6)
activestorage (= 7.0.8.6)
activesupport (= 7.0.8.6)
actiontext (7.0.8.7)
actionpack (= 7.0.8.7)
activerecord (= 7.0.8.7)
activestorage (= 7.0.8.7)
activesupport (= 7.0.8.7)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8.6)
activesupport (= 7.0.8.6)
actionview (7.0.8.7)
activesupport (= 7.0.8.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_record_query_trace (1.8.2)
activerecord (>= 6.0.0)
activejob (7.0.8.6)
activesupport (= 7.0.8.6)
activejob (7.0.8.7)
activesupport (= 7.0.8.7)
globalid (>= 0.3.6)
activejob-uniqueness (0.2.5)
activejob (>= 4.2, < 7.1)
Expand All @@ -130,27 +130,27 @@ GEM
builder (>= 2.1.2, < 4.0.0)
i18n (>= 0.6.9)
nokogiri (~> 1.4)
activemodel (7.0.8.6)
activesupport (= 7.0.8.6)
activemodel (7.0.8.7)
activesupport (= 7.0.8.7)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (7.0.8.6)
activemodel (= 7.0.8.6)
activesupport (= 7.0.8.6)
activerecord (7.0.8.7)
activemodel (= 7.0.8.7)
activesupport (= 7.0.8.7)
activerecord-oracle_enhanced-adapter (7.0.3)
activerecord (~> 7.0.0)
ruby-oci8
ruby-plsql (>= 0.6.0)
activestorage (7.0.8.6)
actionpack (= 7.0.8.6)
activejob (= 7.0.8.6)
activerecord (= 7.0.8.6)
activesupport (= 7.0.8.6)
activestorage (7.0.8.7)
actionpack (= 7.0.8.7)
activejob (= 7.0.8.7)
activerecord (= 7.0.8.7)
activesupport (= 7.0.8.7)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8.6)
activesupport (7.0.8.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -363,7 +363,7 @@ GEM
mail (~> 2.7)
equivalent-xml (0.6.0)
nokogiri (>= 1.4.3)
erubi (1.13.0)
erubi (1.13.1)
escape_utils (1.2.1)
et-orbi (1.2.11)
tzinfo
Expand Down Expand Up @@ -478,7 +478,7 @@ GEM
local-fastimage_resize (3.4.0)
local-fastimage (~> 3.0)
logger (1.6.1)
loofah (2.23.1)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand Down Expand Up @@ -616,25 +616,25 @@ GEM
rack-openid (1.4.2)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-test (2.1.0)
rack-test (2.2.0)
rack (>= 1.3)
rack-utf8_sanitizer (1.9.1)
rack (>= 1.0, < 4.0)
rack-x_served_by (0.1.1)
rails (7.0.8.6)
actioncable (= 7.0.8.6)
actionmailbox (= 7.0.8.6)
actionmailer (= 7.0.8.6)
actionpack (= 7.0.8.6)
actiontext (= 7.0.8.6)
actionview (= 7.0.8.6)
activejob (= 7.0.8.6)
activemodel (= 7.0.8.6)
activerecord (= 7.0.8.6)
activestorage (= 7.0.8.6)
activesupport (= 7.0.8.6)
rails (7.0.8.7)
actioncable (= 7.0.8.7)
actionmailbox (= 7.0.8.7)
actionmailer (= 7.0.8.7)
actionpack (= 7.0.8.7)
actiontext (= 7.0.8.7)
actionview (= 7.0.8.7)
activejob (= 7.0.8.7)
activemodel (= 7.0.8.7)
activerecord (= 7.0.8.7)
activestorage (= 7.0.8.7)
activesupport (= 7.0.8.7)
bundler (>= 1.15.0)
railties (= 7.0.8.6)
railties (= 7.0.8.7)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -643,7 +643,7 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.1)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-observers (0.1.5)
Expand All @@ -658,9 +658,9 @@ GEM
activemodel (>= 3.0)
activesupport (>= 3.0)
ruby_event_store (~> 0.9.0)
railties (7.0.8.6)
actionpack (= 7.0.8.6)
activesupport (= 7.0.8.6)
railties (7.0.8.7)
actionpack (= 7.0.8.7)
activesupport (= 7.0.8.7)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -1004,6 +1004,7 @@ DEPENDENCIES
colorize
commonmarker (~> 0.23.10)
compass-rails (~> 3.0.2)
concurrent-ruby (= 1.3.4)
cucumber (~> 7.0)
cucumber-rails (~> 3.0.0)
dalli
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/provider/admin/dashboards_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ def unread_messages_presenter
end

def quickstarts_flash
return unless flash[:first_login]

first_login = flash[:first_login]
flash.delete(:first_login)

return unless Features::QuickstartsConfig.enabled? && first_login.present?

flash[:notice] = t('provider.admin.dashboards.quick_starts_html', link: provider_admin_quickstarts_path).html_safe
end
end
9 changes: 5 additions & 4 deletions app/views/provider/admin/dashboards/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
- content_for :javascripts do
= javascript_packs_with_chunks_tag 'dashboard'

button class="pf-c-button pf-m-primary pf-c-button__float-button" type="button"
span class="pf-c-button__icon pf-m-start"
i class="fas fa-info-circle" aria-hidden="true"
a href=provider_admin_quickstarts_path Quick starts
- if Features::QuickstartsConfig.enabled?
button class="pf-c-button pf-m-primary pf-c-button__float-button" type="button"
span class="pf-c-button__icon pf-m-start"
i class="fas fa-info-circle" aria-hidden="true"
a href=provider_admin_quickstarts_path Quick starts

.Dashboard
div.Dashboard-widgets
Expand Down
22 changes: 0 additions & 22 deletions app/views/provider/signups/testab.html.slim

This file was deleted.

6 changes: 3 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ignore:
- "features/**/*"
- "test/**/*"
- "spec/**/*"
- "features"
- "test"
- "spec"
2 changes: 1 addition & 1 deletion config/examples/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ features: &default
logging:
audits_to_stdout: true
quickstarts:
enabled: true
enabled: false
email_configuration:
enabled: false

Expand Down
41 changes: 37 additions & 4 deletions features/provider/admin/quickstarts.feature
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
@javascript
Feature: Quick Starts

Background:
And a provider is logged in

Rule: Feature is enabled
Rule: Feature is enabled
Background:
Given quickstarts is enabled
And a provider is logged in

Scenario: Header help menu have the option
Then I should be able to go to the quick start catalog from the help menu

Scenario: Quick start button is displayed
When they go to the dashboard
And they follow "Quick starts"
Then the current page is the quick start catalog page

@narrow-screen
Scenario: Quick start button is not displayed on narrow screens
When they go to the dashboard
Then they should not see "Quick starts"

Scenario: Quick Start catalog
Given I go to the quick start catalog page
Then I should be able to start following a quick start from a gallery
Expand All @@ -28,14 +36,39 @@ Feature: Quick Starts
Given I have finished a quick start
Then I should be able to restart its progress

Scenario: Provider logs in for the first time
Given they should see the flash message "You can use quick starts to learn about 3scale features step by step."
When they follow "Take tour"
Then the current page is the quick start catalog page

Scenario: Provider reloads dashboard
Given they should see the flash message "You can use quick starts to learn about 3scale features step by step."
When they go to the dashboard
And they should not see "You can use quick starts to learn about 3scale features step by step."

Scenario: Provider logs in more than once
When they log out
And the provider logs in
Then they should see the flash message "Signed in successfully"
And they should not see "You can use quick starts to learn about 3scale features step by step."

Rule: Quickstarts disabled
Background:
Given quickstarts is disabled
And a provider is logged in

Scenario: Header help menu does not have the option
Then I should not be able to go to the quick start catalog from the help menu

Scenario: Quick start button is not displayed
When they go to the dashboard
Then they should not see "Quick starts"

Scenario: Following a Quick Start does not show it
Given I am following a quick start
When I go anywhere else
Then I won't be able to see the quick start

Scenario: Provider logs in for the first time
Then they should see the flash message "Signed in successfully"
And they should not see "You can use quick starts to learn about 3scale features step by step."
31 changes: 0 additions & 31 deletions features/provider/dashboard.feature

This file was deleted.

Loading

0 comments on commit 665c6d7

Please sign in to comment.