From e16bc50d363fe65bbceb8aed39a0e19ec91b3329 Mon Sep 17 00:00:00 2001
From: Semyon Pupkov <mail@semyonpupkov.com>
Date: Tue, 6 Dec 2016 13:54:35 +0500
Subject: [PATCH] Move admin logs spinach test to rspec

https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
---
 .../move-admin-logs-spinach-test-to-rspec.yml     |  4 ++++
 features/admin/logs.feature                       |  8 --------
 features/steps/admin/logs.rb                      | 11 -----------
 spec/features/admin/admin_browses_logs_spec.rb    | 15 +++++++++++++++
 4 files changed, 19 insertions(+), 19 deletions(-)
 create mode 100644 changelogs/unreleased/move-admin-logs-spinach-test-to-rspec.yml
 delete mode 100644 features/admin/logs.feature
 delete mode 100644 features/steps/admin/logs.rb
 create mode 100644 spec/features/admin/admin_browses_logs_spec.rb

diff --git a/changelogs/unreleased/move-admin-logs-spinach-test-to-rspec.yml b/changelogs/unreleased/move-admin-logs-spinach-test-to-rspec.yml
new file mode 100644
index 00000000000..696aa8510a0
--- /dev/null
+++ b/changelogs/unreleased/move-admin-logs-spinach-test-to-rspec.yml
@@ -0,0 +1,4 @@
+---
+title: Move admin logs spinach test to rspec
+merge_request: 7945
+author: Semyon Pupkov
diff --git a/features/admin/logs.feature b/features/admin/logs.feature
deleted file mode 100644
index ceb3bc34927..00000000000
--- a/features/admin/logs.feature
+++ /dev/null
@@ -1,8 +0,0 @@
-@admin
-Feature: Admin Logs
-  Background:
-    Given I sign in as an admin
-
-  Scenario: On Admin Logs
-    Given I visit admin logs page
-    Then I should see tabs with available logs
diff --git a/features/steps/admin/logs.rb b/features/steps/admin/logs.rb
deleted file mode 100644
index 63881d69146..00000000000
--- a/features/steps/admin/logs.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class Spinach::Features::AdminLogs < Spinach::FeatureSteps
-  include SharedAuthentication
-  include SharedPaths
-  include SharedAdmin
-
-  step 'I should see tabs with available logs' do
-    expect(page).to have_content 'test.log'
-    expect(page).to have_content 'githost.log'
-    expect(page).to have_content 'application.log'
-  end
-end
diff --git a/spec/features/admin/admin_browses_logs_spec.rb b/spec/features/admin/admin_browses_logs_spec.rb
new file mode 100644
index 00000000000..d880f3f07db
--- /dev/null
+++ b/spec/features/admin/admin_browses_logs_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe 'Admin browses logs' do
+  before do
+    login_as :admin
+  end
+
+  it 'shows available log files' do
+    visit admin_logs_path
+
+    expect(page).to have_content 'test.log'
+    expect(page).to have_content 'githost.log'
+    expect(page).to have_content 'application.log'
+  end
+end
-- 
GitLab