Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/pager.js11
-rw-r--r--app/views/dashboard/_activities.html.haml2
-rw-r--r--app/views/dashboard/index.html.haml2
-rw-r--r--features/dashboard/dashboard.feature3
4 files changed, 14 insertions, 4 deletions
diff --git a/app/assets/javascripts/pager.js b/app/assets/javascripts/pager.js
index 769e8a62343..7edd6bd6186 100644
--- a/app/assets/javascripts/pager.js
+++ b/app/assets/javascripts/pager.js
@@ -4,9 +4,16 @@ var Pager = {
disable:false,
init:
- function(limit) {
+ function(limit, preload) {
this.limit=limit;
- this.offset=limit;
+
+ if(preload) {
+ this.offset = 0;
+ this.getOld();
+ } else {
+ this.offset = limit;
+ }
+
this.initLoadMore();
},
diff --git a/app/views/dashboard/_activities.html.haml b/app/views/dashboard/_activities.html.haml
index c63ef24fca5..2b7d23c225d 100644
--- a/app/views/dashboard/_activities.html.haml
+++ b/app/views/dashboard/_activities.html.haml
@@ -7,7 +7,7 @@
= event_filter_link EventFilter.team, 'Team'
- if @events.any?
- .content_list= render @events
+ .content_list
- else
%p.nothing_here_message Projects activity will be displayed here
.loading.hide
diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml
index b64aa86cf73..d1422bda617 100644
--- a/app/views/dashboard/index.html.haml
+++ b/app/views/dashboard/index.html.haml
@@ -8,4 +8,4 @@
- else
= render "zero_authorized_projects"
:javascript
- $(function(){ Pager.init(20); });
+ $(function(){ Pager.init(20, true); });
diff --git a/features/dashboard/dashboard.feature b/features/dashboard/dashboard.feature
index 972f8e36609..759843692b8 100644
--- a/features/dashboard/dashboard.feature
+++ b/features/dashboard/dashboard.feature
@@ -5,6 +5,7 @@ Feature: Dashboard
And project "Shop" has push event
And I visit dashboard page
+ @javascript
Scenario: I should see projects list
Then I should see "New Project" link
Then I should see "Shop" project link
@@ -26,11 +27,13 @@ Feature: Dashboard
And I click "Create Merge Request" link
Then I see prefilled new Merge Request page
+ @javascript
Scenario: I should see User joined Project event
Given user with name "John Doe" joined project "Shop"
When I visit dashboard page
Then I should see "John Doe joined project at Shop" event
+ @javascript
Scenario: I should see User left Project event
Given user with name "John Doe" joined project "Shop"
And user with name "John Doe" left project "Shop"