Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Clean up tests wording.

Matthew Kennedyfd4ce6a693f5
diff --git a/backend/spec/features/admin/menus/edit_spec.rb b/backend/spec/features/admin/menus/edit_menu_spec.rb
similarity index 85%
rename from backend/spec/features/admin/menus/edit_spec.rb
rename to backend/spec/features/admin/menus/edit_menu_spec.rb
index 79a9c4c426..f36f01882a 100644
--- a/backend/spec/features/admin/menus/edit_spec.rb
+++ b/backend/spec/features/admin/menus/edit_menu_spec.rb
@@ -1,8 +1,10 @@
require 'spec_helper'
-describe 'Editing an existing menu', type: :feature do
+describe 'Menu Edit', type: :feature do
stub_authorization!
+ # Work In Progress
+
let!(:main_menu) { create(:menu, name: 'Main Menu') }
context 'user can add menu items' do
diff --git a/backend/spec/features/admin/menus/index_spec.rb b/backend/spec/features/admin/menus/index_menu_spec.rb
similarity index 90%
rename from backend/spec/features/admin/menus/index_spec.rb
rename to backend/spec/features/admin/menus/index_menu_spec.rb
index ffe7a10667..f57fc69fac 100644
--- a/backend/spec/features/admin/menus/index_spec.rb
+++ b/backend/spec/features/admin/menus/index_menu_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe 'Menu index page', type: :feature do
+describe 'Menus Index', type: :feature do
stub_authorization!
context 'when no menus are present' do
@@ -21,7 +21,7 @@ describe 'Menu index page', type: :feature do
visit spree.admin_menus_path
end
- it 'lists all of the menus in the DOM' do
+ it 'lists all of the menus in the table' do
within_table('menusTable') do
expect(page).to have_text 'Main Menu'
expect(page).to have_text 'Footer Menu'
@@ -37,7 +37,7 @@ describe 'Menu index page', type: :feature do
end
end
- context 'when a user click Add New Menu' do
+ context 'when a user clicks Add New Menu' do
before do
visit spree.admin_menus_path
within('div#contentHeader') do
diff --git a/backend/spec/features/admin/menus/new_spec.rb b/backend/spec/features/admin/menus/new_menu_spec.rb
similarity index 91%
rename from backend/spec/features/admin/menus/new_spec.rb
rename to backend/spec/features/admin/menus/new_menu_spec.rb
index abd43b284c..75e4fe8a24 100644
--- a/backend/spec/features/admin/menus/new_spec.rb
+++ b/backend/spec/features/admin/menus/new_menu_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe 'New Menu Page', type: :feature do
+describe 'New Menu', type: :feature do
stub_authorization!
context 'when user visits new menu page' do
@@ -34,14 +34,14 @@ describe 'New Menu Page', type: :feature do
end
end
- context 'when a user tries to create a menu with no name' do
+ context 'when a user tries to create a menu with a duplicate name' do
let!(:main_menu) { create(:menu, name: 'Main Menu') }
before do
visit spree.new_admin_menu_path
end
- it 'lets the user know that the Name has already been taken' do
+ it 'warns the user that the Name has already been taken' do
fill_in 'Name', with: 'Main Menu'
click_on 'Create'
expect(page).to have_text ('Name has already been taken')