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:
Diffstat (limited to 'spec/features/projects/show/user_interacts_with_stars_spec.rb')
-rw-r--r--spec/features/projects/show/user_interacts_with_stars_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/features/projects/show/user_interacts_with_stars_spec.rb b/spec/features/projects/show/user_interacts_with_stars_spec.rb
index e0dd4f65010..158b6aa9b46 100644
--- a/spec/features/projects/show/user_interacts_with_stars_spec.rb
+++ b/spec/features/projects/show/user_interacts_with_stars_spec.rb
@@ -13,6 +13,14 @@ RSpec.describe 'Projects > Show > User interacts with project stars' do
visit(project_path(project))
end
+ it 'retains the star count even after a page reload' do
+ star_project
+
+ reload_page
+
+ expect(page).to have_css('.star-count', text: 1)
+ end
+
it 'toggles the star' do
star_project
@@ -63,6 +71,10 @@ end
private
+def reload_page
+ visit current_path
+end
+
def star_project
click_button(_('Star'))
wait_for_requests