Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typographical errors from spec directory #3371

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/dummy/app/avo/resources/review.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def fields
help: "For the review with the ID of 1 only admin users will be displayed.",
attach_scope: -> do
# For the parent record with ID 1 we'll apply this rule.
# This is for testing purposes only. Just to show that it's possbile.
# This is for testing purposes only. Just to show that it's possible.
if parent.present? && parent.id == 1
query.admins
else
Expand All @@ -43,7 +43,7 @@ def fields
},
attach_scope: -> do
# For the parent record with ID 1 we'll apply this rule.
# This is for testing purposes only. Just to show that it's possbile.
# This is for testing purposes only. Just to show that it's possible.
if parent.present? && parent.id == 1
query.where("lower(name) like ?", "%#{parent.body[0].downcase}%")
else
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/app/avo/resources/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def main_panel_sidebar
only_on: [:show]
field :is_writer, as: :text,
hide_on: :edit do
raise "This should not execut on Index" if view.index?
raise "This should not execute on Index" if view.index?

record.posts.to_a.size > 0 ? "yes" : "no"
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/config/initializers/friendly_id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# MyModel.find('foo')
#
# This is significantly more convenient but may not be appropriate for
# all applications, so you must explicity opt-in to this behavior. You can
# all applications, so you must explicitly opt-in to this behavior. You can
# always also configure it on a per-model basis if you prefer.
#
# Something else to consider is that using the :finders addon boosts
Expand Down
2 changes: 1 addition & 1 deletion spec/features/avo/app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
end

describe "callable app_name" do
it "displayes the app name with a param" do
it "displays the app name with a param" do
visit "/admin/custom_tool?app_name_suffix=yup"

# Label on the menu builder
Expand Down
2 changes: 1 addition & 1 deletion spec/features/avo/create_has_one_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RSpec.feature "CreateHasOne", type: :feature do
let!(:user) { create :user }

it "policy applyed" do
it "policy applied" do
visit "admin/resources/users/#{user.id}?active_tab_name=Fish&tab_turbo_frame=avo-tabgroup-2"

expect(page).to have_text "Attach fish"
Expand Down
2 changes: 1 addition & 1 deletion spec/features/avo/field_setter_missing_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "rails_helper"

RSpec.feature "FieldSetterMissings", type: :feature do
RSpec.feature "FieldSetterMissing", type: :feature do
let!(:person) { create :person }

context "on index" do
Expand Down
4 changes: 2 additions & 2 deletions spec/features/avo/link_to_child_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
describe "link_to_child_resource " do
context "Resource linking to child resources" do
let!(:sibling) { create :sibling, name: "sibling" }
it "dispaly records linked to the child resource sibling " do
it "display records linked to the child resource sibling " do
Avo::Resources::Person.link_to_child_resource = true
visit "/admin/resources/people"
expect(page).to have_link(href: "/admin/resources/siblings/#{sibling.id}")
end

it "dispaly records linked to the child resource sibling " do
it "display records linked to the child resource sibling " do
Avo::Resources::Person.link_to_child_resource = false
visit "/admin/resources/people"
expect(page).to have_link(href: "/admin/resources/people/#{sibling.id}")
Expand Down
2 changes: 1 addition & 1 deletion spec/features/avo/number_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
is_expected.to have_text "Users required must be less than 1000000"
end

it "cleares the users_required" do
it "clears the users_required" do
is_expected.to have_xpath "//input[@id='project_users_required'][@type='number'][@placeholder='Users required'][@min='10.0'][@max='1000000.0'][@step='1.0'][@value='#{users_required}']"

fill_in "project_users_required", with: 'nil'
Expand Down
6 changes: 3 additions & 3 deletions spec/features/avo/search_has_many_scope_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
RSpec.feature Avo::SearchController, type: :controller do
let!(:course_without_links) { create :course }

it "returns nothing when parent dont have childs" do
it "returns nothing when parent dont have children" do
get :show, params: {
resource_name: "course_links",
via_association: "has_many",
Expand All @@ -20,7 +20,7 @@
let!(:three_links) { create_list :course_link, 3 }
let!(:course_with_three_links) { create :course, links: three_links }

it "returns the exact three records when parent have three childs" do
it "returns the exact three records when parent have three children" do
get :show, params: {
resource_name: "course_links",
via_association: "has_many",
Expand All @@ -39,7 +39,7 @@
let!(:five_links) { create_list :course_link, 5 }
let!(:course_with_five_links) { create :course, links: five_links }

it "returns the exact five records when parent have five childs" do
it "returns the exact five records when parent have five children" do
get :show, params: {
resource_name: "course_links",
via_association: "has_many",
Expand Down
2 changes: 1 addition & 1 deletion spec/features/avo/textarea_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
expect(page).to have_text new_description
end

it "cleares the description" do
it "clears the description" do
visit url

expect(page).to have_field type: "textarea", id: "team_description", placeholder: "Description", text: description
Expand Down
4 changes: 2 additions & 2 deletions spec/features/avo/use_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let!(:comment) { create :comment, user: admin }

describe "tests" do
it "if have diferent fields from original comment resource" do
it "if have different fields from original comment resource" do
visit_page

expect(page).to have_text("Photo comments")
Expand Down Expand Up @@ -49,7 +49,7 @@
expect(page).to have_selector "[title='Delete photo comment']"
end

it "applyes on belongs to" do
it "applies on belongs to" do
visit "admin/resources/comments/#{comment.id}"

expect(page).to have_link comment.user.name,
Expand Down
2 changes: 1 addition & 1 deletion spec/system/avo/attach_and_attach_another_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "rails_helper"

RSpec.describe "Attach and atach another", type: :system do
RSpec.describe "Attach and attach another", type: :system do
let!(:project) { create(:project) }
let!(:comments) { create_list(:comment, 2) }

Expand Down
2 changes: 1 addition & 1 deletion spec/system/avo/resource_sidebar_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
expect(page).to have_css ".resource-sidebar-component"
end

it "allow fields to be eddited on sidebar" do
it "allow fields to be edited on sidebar" do
admin.update!(custom_css: "")
visit avo.edit_resources_user_path(admin)

Expand Down
6 changes: 3 additions & 3 deletions spec/system/avo/select_all_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let!(:salmon) { create_list :fish, spec_salmon_number, name: "Spec Salmon" }
let!(:url) { "/admin/resources/fish?per_page=#{per_page}" }

describe "without applyed filters" do
describe "without applied filters" do
context "select first page" do
it "releases the fish from the selected page" do
visit url
Expand Down Expand Up @@ -76,9 +76,9 @@
end
end

describe "with applyed filters" do
describe "with applied filters" do
context "select all" do
it "releases all fish from applyed filter" do
it "releases all fish from applied filter" do
visit url

open_filters_menu
Expand Down
Loading