Skip to content

Commit 990acfb

Browse files
Added feature flipper for enabling/disabling Last Updated indicator (#2239)
ref #2148 --------- Co-authored-by: Precilla Prempeh <[email protected]>
1 parent 754fd52 commit 990acfb

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

app/views/dashboard/_project_list_view.html.erb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
<div class="type"><%= project.type %></div>
1313
<div class="role"><%= project.role(current_user) %></div>
1414
<div class="download"><%= project.latest_file_list_time %></div>
15-
<div class="activity"><%= project.last_activity %></div>
16-
</div>
17-
</div>
15+
16+
<% if Flipflop.last_updated_dashboard? %>
17+
<div class="activity"><%= project.last_activity %></div>
18+
<% end %>
19+
1820
<div class="storage-details">
1921
<div class="storage">
2022
<div class="w3-light-grey w3-round-xlarge">

config/features.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@
2323
# description: "Take over the world."
2424

2525
feature :disable_login, default: false, description: "Disable login to the web portal."
26+
feature :last_updated_dashboard, default: true, description: "Show last updated column on dashboard."
2627
end

spec/system/features_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
it "flip flop doesn't show for any user" do
1919
visit "/features"
2020
expect(page).not_to have_content("Disable login to the web portal")
21+
expect(page).not_to have_content("Last updated dashboard")
2122
end
2223
end
2324

@@ -31,6 +32,7 @@
3132
it "flip flop doesn't show for any user" do
3233
visit "/features"
3334
expect(page).not_to have_content("Disable login to the web portal")
35+
expect(page).not_to have_content("Last updated dashboard")
3436
end
3537
end
3638

@@ -41,9 +43,10 @@
4143
sign_in current_user
4244
end
4345

44-
it "flip flop doesn't show for any user" do
46+
it "displays for developers" do
4547
visit "/features"
4648
expect(page).to have_content("Disable login to the web portal")
49+
expect(page).to have_content("Last updated dashboard")
4750
end
4851
end
4952

@@ -54,9 +57,10 @@
5457
sign_in current_user
5558
end
5659

57-
it "flip flop doesn't show for any user" do
60+
it "displays for sysadmin users" do
5861
visit "/features"
5962
expect(page).to have_content("Disable login to the web portal")
63+
expect(page).to have_content("Last updated dashboard")
6064
end
6165
end
6266
end

0 commit comments

Comments
 (0)