diff --git a/app/assets/javascripts/base.js.erb b/app/assets/javascripts/base.js.erb index f33dbf96e..5d5722864 100644 --- a/app/assets/javascripts/base.js.erb +++ b/app/assets/javascripts/base.js.erb @@ -254,7 +254,7 @@ var instantClick getImageForLink(a); } - // If a link is focused, it is preloaded just like on mousover. + // If a link is focused, it is preloaded just like on mouseover. // It also covers the issue where a user needs to press // twice in order to follow a focused link. function focusListener(e) { diff --git a/app/assets/javascripts/initializers/initScrolling.js b/app/assets/javascripts/initializers/initScrolling.js index 96b5908d2..352fe4f91 100644 --- a/app/assets/javascripts/initializers/initScrolling.js +++ b/app/assets/javascripts/initializers/initScrolling.js @@ -300,7 +300,7 @@ function paginate(tag, params, requiresApproval) { searchHash.sort_by = 'public_reactions_count'; } - // Brute force copying code from a utlity for quick fix + // Brute force copying code from a utility for quick fix const searchParams = new URLSearchParams(); Object.keys(searchHash).forEach((key) => { const value = searchHash[key]; diff --git a/app/assets/javascripts/initializers/initializePodcastPlayback.js b/app/assets/javascripts/initializers/initializePodcastPlayback.js index 91630e7b6..41b3e3eea 100644 --- a/app/assets/javascripts/initializers/initializePodcastPlayback.js +++ b/app/assets/javascripts/initializers/initializePodcastPlayback.js @@ -1,5 +1,5 @@ /** - * This script hunts for podcast's "Record" for both the podcast_episde's + * This script hunts for podcast's "Record" for both the podcast_episode's * show page and an article page containing podcast liquid tag. It handles * playback and makes sure the record will spin when the podcast is currently * playing. diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index a1ca3f78c..4615d8852 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -205,7 +205,7 @@ label { .admin__tabbed-navbar, .admin__left-sidebar { // Navbar links have text-decorations that are being - // rendered from boostrap. We want to remove these to be + // rendered from bootstrap. We want to remove these to be // consistent with links in the crayons design system. .crayons-link, .crayons-tabs__item { diff --git a/app/assets/stylesheets/config/_variables.scss b/app/assets/stylesheets/config/_variables.scss index 1a6c4d997..18b9ed5f0 100644 --- a/app/assets/stylesheets/config/_variables.scss +++ b/app/assets/stylesheets/config/_variables.scss @@ -3,7 +3,7 @@ // Sizes. ////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// // - // The reason why header height is set here instead of caluclating it based on its + // The reason why header height is set here instead of calculating it based on its // content is because header is sometimes fixed and we need to offset page content // by specific value... And that's the value. diff --git a/app/assets/stylesheets/onboarding.scss b/app/assets/stylesheets/onboarding.scss index 061d190db..748dc495e 100644 --- a/app/assets/stylesheets/onboarding.scss +++ b/app/assets/stylesheets/onboarding.scss @@ -64,7 +64,7 @@ } .close { - // Overide standard button layout + // Override standard button layout background: none; border: none; diff --git a/app/assets/stylesheets/views/listings.scss b/app/assets/stylesheets/views/listings.scss index cfa3bcef8..7a3cd32b4 100644 --- a/app/assets/stylesheets/views/listings.scss +++ b/app/assets/stylesheets/views/listings.scss @@ -44,7 +44,7 @@ // New/Edit Listing form // Tags dropdown -// TODO: componetize styling.. +// TODO: componentize styling.. .listingform { &__tagsoptions { diff --git a/app/controllers/github_repos_controller.rb b/app/controllers/github_repos_controller.rb index 3a7a8361f..1a68fcc13 100644 --- a/app/controllers/github_repos_controller.rb +++ b/app/controllers/github_repos_controller.rb @@ -48,7 +48,7 @@ class GithubReposController < ApplicationController repo end - # Remove pinned repositorioes that were removed from GH or are now private, + # Remove pinned repositories that were removed from GH or are now private, # since the user will not be able to remove them by themselves. known_repositories.each(&:destroy) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 155d8f808..f229e8f6a 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -140,7 +140,7 @@ class SearchController < ApplicationController end def reactions - # [@rhymes] we're recyling the existing params as we want to change the frontend as + # [@rhymes] we're recycling the existing params as we want to change the frontend as # little as possible, we might simplify in the future result = Search::ReadingList.search_documents( current_user, diff --git a/app/controllers/sitemaps_controller.rb b/app/controllers/sitemaps_controller.rb index 59e34f39a..393e894fc 100644 --- a/app/controllers/sitemaps_controller.rb +++ b/app/controllers/sitemaps_controller.rb @@ -85,6 +85,6 @@ class SitemapsController < ApplicationController end def offset - params[:sitemap].split("-")[2].to_i * RESULTS_LIMIT # elvaluates to 0 if not present or not a number + params[:sitemap].split("-")[2].to_i * RESULTS_LIMIT # evaluates to 0 if not present or not a number end end diff --git a/app/javascript/admin/controllers/creator_settings_controller.js b/app/javascript/admin/controllers/creator_settings_controller.js index 1f65390c7..d8c58499e 100644 --- a/app/javascript/admin/controllers/creator_settings_controller.js +++ b/app/javascript/admin/controllers/creator_settings_controller.js @@ -95,7 +95,7 @@ export class CreatorSettingsController extends Controller { /** * Updates ths branding/colors on the Creator Settings Page. - * by overridding the accent-color in the :root object + * by overriding the accent-color in the :root object * * @param {String} color */ diff --git a/app/javascript/article-form/articleForm.jsx b/app/javascript/article-form/articleForm.jsx index 52ef7eeef..13e38e3ab 100644 --- a/app/javascript/article-form/articleForm.jsx +++ b/app/javascript/article-form/articleForm.jsx @@ -307,8 +307,8 @@ export class ArticleForm extends Component { this.setState({ // When the formKey prop changes, it causes the
component to recreate the DOM nodes that it manages. - // This permits us to reset the defaultValue for the MentionAutcompleteTextArea component without having to change - // MentionAutcompleteTextArea component's implementation. + // This permits us to reset the defaultValue for the MentionAutocompleteTextArea component without having to change + // MentionAutocompleteTextArea component's implementation. formKey: new Date().toISOString(), title: this.article.title || '', tagList: this.article.cached_tag_list || '', diff --git a/app/javascript/article-form/components/__tests__/ImageUploader.test.jsx b/app/javascript/article-form/components/__tests__/ImageUploader.test.jsx index 11cdc85a5..f5c566438 100644 --- a/app/javascript/article-form/components/__tests__/ImageUploader.test.jsx +++ b/app/javascript/article-form/components/__tests__/ImageUploader.test.jsx @@ -117,7 +117,7 @@ describe('', () => { expect(await findByText(/uploading.../i)).not.toBeNull(); - // Upload is finished, so the messsage has disappeared. + // Upload is finished, so the message has disappeared. expect(queryByText(/uploading.../i)).toBeNull(); await findByText(/some fake error/i); diff --git a/app/javascript/crayons/Button/__tests__/Button.test.jsx b/app/javascript/crayons/Button/__tests__/Button.test.jsx index 7a019e70b..b4adf5736 100644 --- a/app/javascript/crayons/Button/__tests__/Button.test.jsx +++ b/app/javascript/crayons/Button/__tests__/Button.test.jsx @@ -52,7 +52,7 @@ describe('"`; +exports[`"`; exports[`"`; diff --git a/app/javascript/onboarding/components/Navigation.jsx b/app/javascript/onboarding/components/Navigation.jsx index a49f9d312..d68a9d7ec 100644 --- a/app/javascript/onboarding/components/Navigation.jsx +++ b/app/javascript/onboarding/components/Navigation.jsx @@ -5,7 +5,7 @@ export class Navigation extends Component { /** * A function to render the progress stepper within the `Navigation` component. * By default, it does not show the stepper for the first slide (the `IntroSlide` component). - * It builds a list of `` elements correseponding to the slides, and adds an "active" + * It builds a list of `` elements corresponding to the slides, and adds an "active" * class to any slide that has already been seen or is currently being seen. * * @returns {String} The HTML markup for the stepper. diff --git a/app/javascript/onboarding/components/ProfileForm/TextInput.jsx b/app/javascript/onboarding/components/ProfileForm/TextInput.jsx index c0fd7d363..f4ce94b3e 100644 --- a/app/javascript/onboarding/components/ProfileForm/TextInput.jsx +++ b/app/javascript/onboarding/components/ProfileForm/TextInput.jsx @@ -7,7 +7,7 @@ * "attribute_name": "website_url", * "description": null, * "input_type": "text_input", - * "label": "Webiste URL", + * "label": "Website URL", * "placeholder_text": "" *} * diff --git a/app/javascript/packs/searchParams.js b/app/javascript/packs/searchParams.js index 83727fba9..78e955325 100644 --- a/app/javascript/packs/searchParams.js +++ b/app/javascript/packs/searchParams.js @@ -160,7 +160,7 @@ function search(query, filters, sortBy, sortDirection) { searchHash.search_fields = searchTerm; } - // Brute force copying code from a utlity for quick fix + // Brute force copying code from a utility for quick fix const searchParams = new URLSearchParams(); Object.keys(searchHash).forEach((key) => { const value = searchHash[key]; diff --git a/app/javascript/topNavigation/__tests__/utilities.test.js b/app/javascript/topNavigation/__tests__/utilities.test.js index f4b61b3ea..0041d775e 100644 --- a/app/javascript/topNavigation/__tests__/utilities.test.js +++ b/app/javascript/topNavigation/__tests__/utilities.test.js @@ -15,7 +15,7 @@ import { } from '../utilities'; // TODO: ★★★ These tests should be promoted to E2E tests once we have that in place. ★★★ -describe('top navigation utilitities', () => { +describe('top navigation utilities', () => { beforeEach(() => { // Recreating the body element completely so as to remove any CSS classes // that were added to it. diff --git a/app/javascript/utilities/__tests__/textAreaUtils.test.js b/app/javascript/utilities/__tests__/textAreaUtils.test.js index fe9efc307..efa3cd707 100644 --- a/app/javascript/utilities/__tests__/textAreaUtils.test.js +++ b/app/javascript/utilities/__tests__/textAreaUtils.test.js @@ -90,7 +90,7 @@ describe('getLastIndexOfCharacter', () => { ).toEqual(-1); }); - it('returns index of the last occurence within a single word', () => { + it('returns index of the last occurrence within a single word', () => { expect( getLastIndexOfCharacter({ content: 'abcde', @@ -100,7 +100,7 @@ describe('getLastIndexOfCharacter', () => { ).toEqual(1); }); - it('returns index of the last occurence searching through multiple words', () => { + it('returns index of the last occurrence searching through multiple words', () => { expect( getLastIndexOfCharacter({ content: 'ab cd ef ghi', @@ -143,7 +143,7 @@ describe('getNextIndexOfCharacter', () => { ).toEqual(-1); }); - it('returns index of the last occurence within a single word', () => { + it('returns index of the last occurrence within a single word', () => { expect( getNextIndexOfCharacter({ content: 'abcde', @@ -153,7 +153,7 @@ describe('getNextIndexOfCharacter', () => { ).toEqual(4); }); - it('returns index of the last occurence searching through multiple words', () => { + it('returns index of the last occurrence searching through multiple words', () => { expect( getNextIndexOfCharacter({ content: 'ab cd ef ghi', diff --git a/app/javascript/utilities/color/WCAGColorContrast.js b/app/javascript/utilities/color/WCAGColorContrast.js index 05df1d324..80cd30276 100644 --- a/app/javascript/utilities/color/WCAGColorContrast.js +++ b/app/javascript/utilities/color/WCAGColorContrast.js @@ -6,7 +6,7 @@ */ export const WCAGColorContrast = { /** - * Calculate contast ratio beetween rgb1 and rgb2 + * Calculate contrast ratio between rgb1 and rgb2 * @param {String} rgb1 6-letter RGB color. * @param {String} rgb2 6-letter RGB color. * @return {Number} diff --git a/app/javascript/utilities/color/contrastValidator.js b/app/javascript/utilities/color/contrastValidator.js index b116654d7..74ddd5efd 100644 --- a/app/javascript/utilities/color/contrastValidator.js +++ b/app/javascript/utilities/color/contrastValidator.js @@ -1,7 +1,7 @@ import { WCAGColorContrast } from './WCAGColorContrast'; /** - * Determine if the contast ratio is low. + * Determine if the contrast ratio is low. * Uses the WCAGColorContrast utility library. * * @param {String} rgb1 6-letter RGB color. diff --git a/app/javascript/utilities/dropdownUtils.js b/app/javascript/utilities/dropdownUtils.js index 76bf5d920..9a5f9acc1 100644 --- a/app/javascript/utilities/dropdownUtils.js +++ b/app/javascript/utilities/dropdownUtils.js @@ -190,7 +190,7 @@ export const initializeDropdown = ({ document.removeEventListener('click', clickOutsideListener); }; - // Add the main trigger button toggle funcationality + // Add the main trigger button toggle functionality triggerButton.addEventListener('click', () => { if ( document diff --git a/app/javascript/utilities/textAreaUtils.js b/app/javascript/utilities/textAreaUtils.js index a2fff5349..58d3021be 100644 --- a/app/javascript/utilities/textAreaUtils.js +++ b/app/javascript/utilities/textAreaUtils.js @@ -103,14 +103,14 @@ export const getMentionWordData = (textArea) => { }; /** - * Searches backwards through text content for the last occurence of the given character + * Searches backwards through text content for the last occurrence of the given character * * @param {Object} params * @param {string} content The chunk of text to search within * @param {number} selectionIndex The starting point to search from * @param {string} character The character to search for * @param {string[]} breakOnCharacters Any characters which should result in an immediate halt to the search - * @returns {number} Index of the last occurence of the character, or -1 if it isn't found + * @returns {number} Index of the last occurrence of the character, or -1 if it isn't found */ export const getLastIndexOfCharacter = ({ content, @@ -138,14 +138,14 @@ export const getLastIndexOfCharacter = ({ }; /** - * Searches forwards through text content for the next occurence of the given character + * Searches forwards through text content for the next occurrence of the given character * * @param {Object} params * @param {string} content The chunk of text to search within * @param {number} selectionIndex The starting point to search from * @param {string} character The character to search for * @param {string[]} breakOnCharacters Any characters which should result in an immediate halt to the search - * @returns {number} Index of the next occurence of the character, or -1 if it isn't found + * @returns {number} Index of the next occurrence of the character, or -1 if it isn't found */ export const getNextIndexOfCharacter = ({ content, diff --git a/app/lib/constants/settings/general.rb b/app/lib/constants/settings/general.rb index 848497d5d..3d420aece 100644 --- a/app/lib/constants/settings/general.rb +++ b/app/lib/constants/settings/general.rb @@ -135,7 +135,7 @@ module Constants description: "Secret key used to allow AWS video encoding through the VideoStatesController", placeholder: "" } - # Dynamic values ommitted: configurable_rate_limits and social_media_handles + # Dynamic values omitted: configurable_rate_limits and social_media_handles }.freeze end end diff --git a/app/models/device.rb b/app/models/device.rb index 7178d7e08..7dc7a2e31 100644 --- a/app/models/device.rb +++ b/app/models/device.rb @@ -42,7 +42,7 @@ class Device < ApplicationRecord }, "thread-id": Settings::Community.community_name, sound: "default", - # This key is required to modify the notifiaction in the iOS app: https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications#2942066 + # This key is required to modify the notification in the iOS app: https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications#2942066 "mutable-content": 1 }, data: payload diff --git a/app/models/settings/authentication.rb b/app/models/settings/authentication.rb index b44d5cc38..5b3e90103 100644 --- a/app/models/settings/authentication.rb +++ b/app/models/settings/authentication.rb @@ -27,7 +27,7 @@ module Settings setting :twitter_key, type: :string, default: ApplicationConfig["TWITTER_KEY"] setting :twitter_secret, type: :string, default: ApplicationConfig["TWITTER_SECRET"] - # Google ReCATPCHA keys + # Google ReCAPTCHA keys setting :recaptcha_site_key, type: :string, default: ApplicationConfig["RECAPTCHA_SITE"] setting :recaptcha_secret_key, type: :string, default: ApplicationConfig["RECAPTCHA_SECRET"] diff --git a/app/models/settings/user_experience.rb b/app/models/settings/user_experience.rb index 0e00748b7..1743050e6 100644 --- a/app/models/settings/user_experience.rb +++ b/app/models/settings/user_experience.rb @@ -1,5 +1,5 @@ module Settings - # Basic UX settings that can be overriden by individual user preferences. + # Basic UX settings that can be overridden by individual user preferences. class UserExperience < Base self.table_name = :settings_user_experiences diff --git a/app/services/articles/feeds.rb b/app/services/articles/feeds.rb index 4f8e298b8..022b147b3 100644 --- a/app/services/articles/feeds.rb +++ b/app/services/articles/feeds.rb @@ -4,7 +4,7 @@ module Articles # to consider it in the relevance feed. # # @note I believe that it is likely we would extract this constant - # into an adminsitrative setting. Hence, I want to keep it + # into an administrative setting. Hence, I want to keep it # a scalar. DEFAULT_DAYS_SINCE_PUBLISHED = 7 diff --git a/app/services/articles/feeds/weighted_query_strategy.rb b/app/services/articles/feeds/weighted_query_strategy.rb index 84f63a02e..03ea43135 100644 --- a/app/services/articles/feeds/weighted_query_strategy.rb +++ b/app/services/articles/feeds/weighted_query_strategy.rb @@ -3,7 +3,7 @@ module Articles # @api private # # This is an experimental object that we're refining to be a - # competetor to the existing feed strategies. + # competitor to the existing feed strategies. # # It works to implement conceptual parity with two methods of # Articles::Feeds::LargeForemExperimental: @@ -33,7 +33,7 @@ module Articles class WeightedQueryStrategy # This constant defines the allowable relevance scoring methods. # - # A scoring method should be a SQL fragement that produces a + # A scoring method should be a SQL fragment that produces a # value between 0 and 1. The closer the value is to 1, the more # relevant the article is for the given user. Note: the values # are multiplicative. Make sure to consider if you want a 0 diff --git a/app/services/authentication/providers/facebook.rb b/app/services/authentication/providers/facebook.rb index c11c566ca..2f53876e0 100644 --- a/app/services/authentication/providers/facebook.rb +++ b/app/services/authentication/providers/facebook.rb @@ -1,6 +1,6 @@ module Authentication module Providers - # Facbook authentication provider, uses omniauth-facebook as backend + # Facebook authentication provider, uses omniauth-facebook as backend class Facebook < Provider OFFICIAL_NAME = "Facebook".freeze SETTINGS_URL = "https://www.facebook.com/settings?tab=applications".freeze diff --git a/app/services/feeds/import.rb b/app/services/feeds/import.rb index 3397a2c91..0a16ce62e 100644 --- a/app/services/feeds/import.rb +++ b/app/services/feeds/import.rb @@ -103,7 +103,7 @@ module Feeds [user_id, parsed_feed] rescue StandardError => e - # TODO: add better exception handling (eg. rescueing Feedjira::NoParserAvailable separately) + # TODO: add better exception handling (eg. rescuing Feedjira::NoParserAvailable separately) report_error( e, feeds_import_info: { diff --git a/app/services/github/oauth_client.rb b/app/services/github/oauth_client.rb index b629b58de..ec76297af 100644 --- a/app/services/github/oauth_client.rb +++ b/app/services/github/oauth_client.rb @@ -1,5 +1,5 @@ module Github - # Github OAuth2 client (uses ocktokit.rb as a backend) + # Github OAuth2 client (uses octokit.rb as a backend) class OauthClient APP_AUTH_CREDENTIALS = %i[client_id client_secret].freeze APP_AUTH_CREDENTIALS_PRESENT = proc { |key, value| APP_AUTH_CREDENTIALS.include?(key) && value.present? }.freeze diff --git a/app/services/markdown_processor/fixer/base.rb b/app/services/markdown_processor/fixer/base.rb index 979d7e949..7f68eb11a 100644 --- a/app/services/markdown_processor/fixer/base.rb +++ b/app/services/markdown_processor/fixer/base.rb @@ -82,7 +82,7 @@ module MarkdownProcessor # either single or double quotes. match = captured_text.scan(/(^".*"$|^'.*'$)/) if match.empty? - # Double quotes that aren't already escaped will get esacped. + # Double quotes that aren't already escaped will get escaped. # Then the whole text get warped in double quotes. parsed_text = captured_text.gsub(/(? Bullet.add_safelist(type: :n_plus_one_query, class_name: "ActsAsTaggableOn::Tagging", association: :tag) - # Supress incorrect warnings from Bullet due to included columns: https://github.com/flyerhzm/bullet/issues/147 + # Suppress incorrect warnings from Bullet due to included columns: https://github.com/flyerhzm/bullet/issues/147 Bullet.add_safelist(type: :unused_eager_loading, class_name: "Article", association: :top_comments) Bullet.add_safelist(type: :unused_eager_loading, class_name: "Article", association: :collection) Bullet.add_safelist(type: :unused_eager_loading, class_name: "Comment", association: :user) diff --git a/config/environments/test.rb b/config/environments/test.rb index 23fbc89fb..946dabf7b 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -77,11 +77,11 @@ Rails.application.configure do Bullet.add_safelist(type: :unused_eager_loading, class_name: "ApiSecret", association: :user) # acts-as-taggable-on has super weird eager loading problems: Bullet.add_safelist(type: :n_plus_one_query, class_name: "ActsAsTaggableOn::Tagging", association: :tag) - # Supress incorrect warnings from Bullet due to included columns: https://github.com/flyerhzm/bullet/issues/147 + # Suppress incorrect warnings from Bullet due to included columns: https://github.com/flyerhzm/bullet/issues/147 Bullet.add_safelist(type: :unused_eager_loading, class_name: "Article", association: :top_comments) Bullet.add_safelist(type: :unused_eager_loading, class_name: "Article", association: :collection) Bullet.add_safelist(type: :unused_eager_loading, class_name: "Comment", association: :user) - # @citizen428: We have not yet resolved all user - profile preloads related to profilge generalization + # @citizen428: We have not yet resolved all user - profile preloads related to profile generalization Bullet.add_safelist(type: :n_plus_one_query, class_name: "User", association: :profile) Bullet.add_safelist(type: :n_plus_one_query, class_name: "Profile", association: :user) Bullet.add_safelist(type: :n_plus_one_query, class_name: "User", association: :setting) diff --git a/config/field_test.yml b/config/field_test.yml index e82dce29f..97e3e8560 100644 --- a/config/field_test.yml +++ b/config/field_test.yml @@ -47,6 +47,6 @@ exclude: # Dashboard performance cache: true -# For logged-in users we'll explicitely pass participant. +# For logged-in users we'll explicitly pass participant. # If we experiment on non-logged in, we don't want to collect cookies anyway. cookies: false diff --git a/cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js b/cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js index 698725641..ef9c270f1 100644 --- a/cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js +++ b/cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js @@ -86,7 +86,7 @@ describe('Creator Settings Page', () => { }); context('color contrast ratios', () => { - it('should show an error when the constrast ratio of a brand color is too low', () => { + it('should show an error when the contrast ratio of a brand color is too low', () => { const lowContrastColor = '#a6e8a6'; cy.findByLabelText(/^Brand color/) @@ -99,7 +99,7 @@ describe('Creator Settings Page', () => { ).should('be.visible'); }); - it('should not show an error when the constrast ratio of a brand color is good', () => { + it('should not show an error when the contrast ratio of a brand color is good', () => { const adequateContrastColor = '#25544b'; cy.findByLabelText(/^Brand color/) diff --git a/cypress/integration/seededFlows/articleFlows/manageFlows/unlockDiscussion.spec.js b/cypress/integration/seededFlows/articleFlows/manageFlows/unlockDiscussion.spec.js index 1169389ac..de3145f6c 100644 --- a/cypress/integration/seededFlows/articleFlows/manageFlows/unlockDiscussion.spec.js +++ b/cypress/integration/seededFlows/articleFlows/manageFlows/unlockDiscussion.spec.js @@ -84,7 +84,7 @@ describe('Unlock discussion', () => { }); it('should not show a discussion lock', () => { - cy.get('#dicussion-lock').should('not.exist'); + cy.get('#discussion-lock').should('not.exist'); }); }); }); diff --git a/cypress/integration/seededFlows/loginFlows/userChangePassword.spec.js b/cypress/integration/seededFlows/loginFlows/userChangePassword.spec.js index 2419231cd..5251090cd 100644 --- a/cypress/integration/seededFlows/loginFlows/userChangePassword.spec.js +++ b/cypress/integration/seededFlows/loginFlows/userChangePassword.spec.js @@ -42,7 +42,7 @@ describe('User Change Password', () => { }); // We intercept these requests to make sure all async sign-in requests have completed before finishing the test. - // This ensures async responses do not intefere with subsequent test setup + // This ensures async responses do not interfere with subsequent test setup const loginNetworkRequests = getInterceptsForLingeringUserRequests( '/', true, diff --git a/cypress/integration/seededFlows/registrationFlows/emailRegistration.spec.js b/cypress/integration/seededFlows/registrationFlows/emailRegistration.spec.js index fa4712ce9..a699fc19f 100644 --- a/cypress/integration/seededFlows/registrationFlows/emailRegistration.spec.js +++ b/cypress/integration/seededFlows/registrationFlows/emailRegistration.spec.js @@ -5,7 +5,7 @@ describe('Sign up with email', () => { }); // Regression test for #11099 - it('should preserve the form data on unsuccesful submissions', () => { + it('should preserve the form data on unsuccessful submissions', () => { cy.findByRole('link', { name: /Sign up with Email/ }).click(); cy.findByLabelText('Profile image').attachFile('images/admin-image.png'); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index f55a26cf8..c06b26413 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -112,7 +112,7 @@ Cypress.Commands.add('loginUser', ({ email, password }) => { cy.log('Login failed. Attempting one more login.'); // If we have a login failure, try one more time. - // This is to combat some flaky tests where the login fails occasionnally. + // This is to combat some flaky tests where the login fails occasionally. return getLoginRequest(); }); }); @@ -150,7 +150,7 @@ Cypress.Commands.add('loginCreator', ({ name, username, email, password }) => { cy.log('Login failed. Attempting one more login.'); // If we have a login failure, try one more time. - // This is to combat some flaky tests where the login fails occasionnally. + // This is to combat some flaky tests where the login fails occasionally. return getLoginRequest(); }); }); @@ -193,7 +193,7 @@ const DEFAULT_AUTH_CONFIG = { }; /** - * Sets default values of Settings::General atrributes relevant to Authentication Section. + * Sets default values of Settings::General attributes relevant to Authentication Section. * * @param username {string} The username used in the test * @param settingsGeneral diff --git a/lib/generators/service/USAGE b/lib/generators/service/USAGE index e30e39d5c..dc96e4281 100644 --- a/lib/generators/service/USAGE +++ b/lib/generators/service/USAGE @@ -41,7 +41,7 @@ Examples: end end - # spec/servics/import_users_spec.rb + # spec/services/import_users_spec.rb # Same as above * Generating a namespaced service: diff --git a/spec/decorators/listing_decorator_spec.rb b/spec/decorators/listing_decorator_spec.rb index 2aadfa04e..898eb92bf 100644 --- a/spec/decorators/listing_decorator_spec.rb +++ b/spec/decorators/listing_decorator_spec.rb @@ -13,7 +13,7 @@ RSpec.describe ListingDecorator, type: :decorator do expect(decorated_listing.social_preview_category).to eq(category.name) end - it "returns the category's social preview descripton if available" do + it "returns the category's social preview description if available" do expect(decorated_listing.social_preview_category) .to eq(category.social_preview_description) end diff --git a/spec/liquid_tags/codesandbox_tag_spec.rb b/spec/liquid_tags/codesandbox_tag_spec.rb index 815a28cd1..5a8b538f7 100644 --- a/spec/liquid_tags/codesandbox_tag_spec.rb +++ b/spec/liquid_tags/codesandbox_tag_spec.rb @@ -46,67 +46,67 @@ RSpec.describe CodesandboxTag, type: :liquid_tag do Liquid::Template.parse("{% codesandbox #{id} %}") end - it "accepts a vaild id" do + it "accepts a valid id" do liquid = generate_tag(valid_id) expect(liquid.render).to include("exxpired

", + body_markdown: "expired", + processed_html: "

expired

", tag_list: %w[x y z], organization_id: nil, bumped_at: datetime, diff --git a/spec/liquid_tags/stackexchange_tag_spec.rb b/spec/liquid_tags/stackexchange_tag_spec.rb index 220b0f07f..1680e3c75 100644 --- a/spec/liquid_tags/stackexchange_tag_spec.rb +++ b/spec/liquid_tags/stackexchange_tag_spec.rb @@ -42,7 +42,7 @@ RSpec.describe StackexchangeTag, type: :liquid_tag, vcr: true do end.to raise_error(StandardError) end - it "does not break with volountarily removed questions" do + it "does not break with voluntarily removed questions" do VCR.use_cassette("stackexchange_tag_deleted_question") do expect do liquid = generate_exchange_liquid(valid_id_deleted_question) diff --git a/spec/liquid_tags/twitter_timeline_tag_spec.rb b/spec/liquid_tags/twitter_timeline_tag_spec.rb index 982390961..0c763739a 100644 --- a/spec/liquid_tags/twitter_timeline_tag_spec.rb +++ b/spec/liquid_tags/twitter_timeline_tag_spec.rb @@ -21,7 +21,7 @@ RSpec.describe TwitterTimelineTag, type: :lyquid_tag do Liquid::Template.parse("{% twitter_timeline #{link} %}") end - it "accepts a vaild link" do + it "accepts a valid link" do valid_twitter_timeline_links.each do |valid_link| liquid = generate_new_liquid(valid_link) expect(liquid.render).to include("') end - it "sets canonical url with prefil" do + it "sets canonical url with prefill" do get "/new?prefill=dsdweewewew" expect(response.body).to include('') end diff --git a/spec/requests/dashboard_spec.rb b/spec/requests/dashboard_spec.rb index a771db6dd..219654992 100644 --- a/spec/requests/dashboard_spec.rb +++ b/spec/requests/dashboard_spec.rb @@ -355,9 +355,9 @@ RSpec.describe "Dashboards", type: :request do end it "raises an error when the source can't be found" do - nonexistant_article_params = { source_type: article.class.name, source_id: article.id + 999 } + nonexistent_article_params = { source_type: article.class.name, source_id: article.id + 999 } expect do - get "/dashboard/subscriptions", params: nonexistant_article_params + get "/dashboard/subscriptions", params: nonexistent_article_params end.to raise_error(ActiveRecord::RecordNotFound) end diff --git a/spec/requests/discussion_locks_spec.rb b/spec/requests/discussion_locks_spec.rb index b2edaaf16..024c26ec5 100644 --- a/spec/requests/discussion_locks_spec.rb +++ b/spec/requests/discussion_locks_spec.rb @@ -9,7 +9,7 @@ RSpec.describe "DiscussionLocks", type: :request do describe "POST /discussion_locks - DiscussionLocks#create" do it "creates a DiscussionLock" do article = create(:article, user: user) - reason = "Unproductice comments." + reason = "Unproductive comments." notes = "Hostile comment from user @user" valid_attributes = { article_id: article.id, locking_user_id: user.id, notes: notes, reason: reason } expect do @@ -50,7 +50,7 @@ RSpec.describe "DiscussionLocks", type: :request do sign_out user sign_in other_user - reason = "Unproductice comments." + reason = "Unproductive comments." notes = "Hostile comment from user @user" valid_attributes = { article_id: article.id, locking_user_id: other_user.id, notes: notes, reason: reason } expect do diff --git a/spec/requests/follows_bulk_show_spec.rb b/spec/requests/follows_bulk_show_spec.rb index 1e68e6528..bbc7bf899 100644 --- a/spec/requests/follows_bulk_show_spec.rb +++ b/spec/requests/follows_bulk_show_spec.rb @@ -5,26 +5,26 @@ RSpec.describe "Follows #bulk_show", type: :request do let(:followed_user) { create(:user) } let(:not_followed_user) { create(:user) } let(:follow_back_user) { create(:user) } - let(:mutal_follow_user) { create(:user) } + let(:mutual_follow_user) { create(:user) } context "when ids are present" do before do sign_in current_user current_user.follow(followed_user) - current_user.follow(mutal_follow_user) + current_user.follow(mutual_follow_user) follow_back_user.follow(current_user) - mutal_follow_user.follow(current_user) + mutual_follow_user.follow(current_user) end it "returns correct following values" do - ids = [followed_user.id, not_followed_user.id, current_user.id, follow_back_user.id, mutal_follow_user.id] + ids = [followed_user.id, not_followed_user.id, current_user.id, follow_back_user.id, mutual_follow_user.id] get bulk_show_follows_path, params: { ids: ids } expect(response.parsed_body[current_user.id.to_s]).to eq("self") expect(response.parsed_body[followed_user.id.to_s]).to eq("true") expect(response.parsed_body[not_followed_user.id.to_s]).to eq("false") expect(response.parsed_body[follow_back_user.id.to_s]).to eq("follow-back") - expect(response.parsed_body[mutal_follow_user.id.to_s]).to eq("mutual") + expect(response.parsed_body[mutual_follow_user.id.to_s]).to eq("mutual") end end diff --git a/spec/requests/moderations_spec.rb b/spec/requests/moderations_spec.rb index 6f37d5f26..308343c1b 100644 --- a/spec/requests/moderations_spec.rb +++ b/spec/requests/moderations_spec.rb @@ -15,7 +15,7 @@ RSpec.shared_examples "an elevated privilege required request" do |path| context "when user is not trusted" do before { sign_in create(:user) } - it "does not grant acesss", proper_status: true do + it "does not grant access", proper_status: true do get path expect(response).to have_http_status(:not_found) end diff --git a/spec/requests/registrations_spec.rb b/spec/requests/registrations_spec.rb index 8b52dcf2e..bbf0c556f 100644 --- a/spec/requests/registrations_spec.rb +++ b/spec/requests/registrations_spec.rb @@ -231,7 +231,7 @@ RSpec.describe "Registrations", type: :request do expect(User.all.size).to be 1 end - it "marks as registerd" do + it "marks as registered" do post "/users", params: { user: { name: "test #{rand(10)}", username: "haha_#{rand(10)}", diff --git a/spec/requests/user/user_settings_spec.rb b/spec/requests/user/user_settings_spec.rb index e94ebc308..4bc5f0337 100644 --- a/spec/requests/user/user_settings_spec.rb +++ b/spec/requests/user/user_settings_spec.rb @@ -53,7 +53,7 @@ RSpec.describe "UserSettings", type: :request do expect(response.body).to include("Email notifications", "Mobile notifications", "General notifications") end - it "displays moderator notifications secons on Notifications tab if trusted" do + it "displays moderator notifications second on Notifications tab if trusted" do user.add_role(:trusted) get user_settings_path(:notifications) diff --git a/spec/services/articles/feeds/large_forem_experimental_spec.rb b/spec/services/articles/feeds/large_forem_experimental_spec.rb index 13966db03..b3fa168ac 100644 --- a/spec/services/articles/feeds/large_forem_experimental_spec.rb +++ b/spec/services/articles/feeds/large_forem_experimental_spec.rb @@ -171,7 +171,7 @@ RSpec.describe Articles::Feeds::LargeForemExperimental, type: :service do end # This test handles a situation in which there are a low number of hot or new stories, and the user is logged in. - # Previously the offest factor could result in zero stories being returned sometimes. + # Previously the offset factor could result in zero stories being returned sometimes. # We manually called `feed.globally_hot_articles` here because `let` caches it! it "still returns articles" do diff --git a/spec/services/articles/feeds/latest_spec.rb b/spec/services/articles/feeds/latest_spec.rb index ce94aee35..019b45a7c 100644 --- a/spec/services/articles/feeds/latest_spec.rb +++ b/spec/services/articles/feeds/latest_spec.rb @@ -13,7 +13,7 @@ RSpec.describe Articles::Feeds::Latest, type: :service do expect(result).to eq [newest_article, hot_article, month_old_article] end - it "only returns articles with scores above the minumum" do + it "only returns articles with scores above the minimum" do expect(described_class.call).not_to include(low_scoring_article) end end diff --git a/spec/services/authentication/authenticator_spec.rb b/spec/services/authentication/authenticator_spec.rb index 67cc8c0c6..471aaaa5d 100644 --- a/spec/services/authentication/authenticator_spec.rb +++ b/spec/services/authentication/authenticator_spec.rb @@ -202,12 +202,12 @@ RSpec.describe Authentication::Authenticator, type: :service do end it "does not update the username when the first_name is nil" do - previos_username = user.apple_username + previous_username = user.apple_username auth_payload.info.first_name = nil user = described_class.call(auth_payload) - expect(user.apple_username).to eq(previos_username) + expect(user.apple_username).to eq(previous_username) end it "updates profile_updated_at when the username is changed" do diff --git a/spec/services/color/compare_hex_spec.rb b/spec/services/color/compare_hex_spec.rb index 45e134b44..559aabd42 100644 --- a/spec/services/color/compare_hex_spec.rb +++ b/spec/services/color/compare_hex_spec.rb @@ -38,7 +38,7 @@ RSpec.describe Color::CompareHex, type: :service do expect(hc.accent).to eq("#d8eafc") end - it "generates an rgba value with opactity" do + it "generates an rgba value with opacity" do rgba = described_class.new(["#123456"]).opacity(0.5) expect(rgba).to eq("rgba(18, 52, 86, 0.50)") end diff --git a/spec/services/podcasts/get_media_url_spec.rb b/spec/services/podcasts/get_media_url_spec.rb index 83fe177c6..dfa22940b 100644 --- a/spec/services/podcasts/get_media_url_spec.rb +++ b/spec/services/podcasts/get_media_url_spec.rb @@ -21,7 +21,7 @@ RSpec.describe Podcasts::GetMediaUrl, type: :service do expect(result.url).to eq(url) end - it "https, unrechable" do + it "https, unreachable" do stub_request(:head, https_url).to_return(status: 404) result = described_class.call(https_url) expect(result.https).to be true diff --git a/spec/services/re_captcha/check_enabled_spec.rb b/spec/services/re_captcha/check_enabled_spec.rb index 8695a0d1d..0890c4f7c 100644 --- a/spec/services/re_captcha/check_enabled_spec.rb +++ b/spec/services/re_captcha/check_enabled_spec.rb @@ -5,7 +5,7 @@ RSpec.describe ReCaptcha::CheckEnabled, type: :request do let(:recent_user) { create(:user) } let(:older_user) { create(:user, created_at: 3.months.ago) } let(:trusted_user) { create(:user, :trusted) } - let(:vomitted_user) do + let(:vomited_user) do user = create(:user, created_at: 3.months.ago) create(:vomit_reaction, category: "vomit", reactable: user, user: trusted_user, status: "confirmed") user @@ -48,8 +48,8 @@ RSpec.describe ReCaptcha::CheckEnabled, type: :request do end it "marks ReCaptcha as enabled when user with vomits is logged in" do - sign_in vomitted_user - expect(described_class.call(vomitted_user)).to be(true) + sign_in vomited_user + expect(described_class.call(vomited_user)).to be(true) end it "marks ReCaptcha as enabled when a suspended user is logged in" do diff --git a/spec/services/users/update_spec.rb b/spec/services/users/update_spec.rb index 6ddf135bd..ae4555312 100644 --- a/spec/services/users/update_spec.rb +++ b/spec/services/users/update_spec.rb @@ -26,7 +26,7 @@ RSpec.describe Users::Update, type: :service do end.to change { profile.data.key?("removed") }.to(false) end - it "propagates changes to user", :agregate_failures do + it "propagates changes to user", :aggregate_failures do new_name = "Sloan Doe" described_class.call(user, profile: {}, user: { name: new_name }) expect(profile.user.name).to eq new_name diff --git a/spec/support/fixtures/sample_article_template_spec.txt b/spec/support/fixtures/sample_article_template_spec.txt index acd5105c5..818eb6135 100644 --- a/spec/support/fixtures/sample_article_template_spec.txt +++ b/spec/support/fixtures/sample_article_template_spec.txt @@ -35,7 +35,7 @@ Format: ![Alt Text](url) * TEST1 * TEST1.1 * TEST1.1.1 - * TESET1.1.3 + * TEST1.1.3 2. **Line break in ul/ol spacing test 2** * ITEM 1 diff --git a/spec/support/fixtures/vcr_cassettes/github_client_issue.yml b/spec/support/fixtures/vcr_cassettes/github_client_issue.yml index 1bf388c3f..0552dacf9 100644 --- a/spec/support/fixtures/vcr_cassettes/github_client_issue.yml +++ b/spec/support/fixtures/vcr_cassettes/github_client_issue.yml @@ -81,7 +81,7 @@ http_interactions: properly when the colours are related.\r\n\r\nSee the pictures below or visit my profile [dev.to/catalinmpit](https://dev.to/catalinmpit).\r\n\r\n**To Reproduce**\r\n\r\n1. Go to [dev.to/catalinmpit](https://dev.to/catalinmpit)\r\n\r\n**Expected behavior**\r\n\r\nMy - name and other information should be visible.\r\n\r\n**Screenshots**\r\n\r\n![broken-profile-page](https://i.imgur.com/AJyM7tH.png)\r\n\r\n**Aditional + name and other information should be visible.\r\n\r\n**Screenshots**\r\n\r\n![broken-profile-page](https://i.imgur.com/AJyM7tH.png)\r\n\r\n**Additional information**\r\n\r\nPlayed around with the settings and I''ve done this:\r\n\r\n![profile-page-ok](https://i.imgur.com/DLiPXFT.png)\r\n\r\n**Question**\r\n\r\nWhat do you recommend to fix the issue? If you have any recommendations, I''m happy to pick the issue.\r\n","closed_by":null}' @@ -97,7 +97,7 @@ http_interactions: when the profile page doesn''t work properly when the colours are related.\r\n\r\nSee the pictures below or visit my profile [dev.to/catalinmpit](https://dev.to/catalinmpit).\r\n\r\n**To Reproduce**\r\n\r\n1. Go to [dev.to/catalinmpit](https://dev.to/catalinmpit)\r\n\r\n**Expected - behavior**\r\n\r\nMy name and other information should be visible.\r\n\r\n**Screenshots**\r\n\r\n![broken-profile-page](https://i.imgur.com/AJyM7tH.png)\r\n\r\n**Aditional + behavior**\r\n\r\nMy name and other information should be visible.\r\n\r\n**Screenshots**\r\n\r\n![broken-profile-page](https://i.imgur.com/AJyM7tH.png)\r\n\r\n**Additional information**\r\n\r\nPlayed around with the settings and I''ve done this:\r\n\r\n![profile-page-ok](https://i.imgur.com/DLiPXFT.png)\r\n\r\n**Question**\r\n\r\nWhat do you recommend to fix the issue? If you have any recommendations, I''m happy to pick the issue.\r\n"}' @@ -172,7 +172,7 @@ http_interactions:

My name and other information should be visible.

Screenshots

broken-profile-page

-

Aditional information

+

Additional information

Played around with the settings and I've done this:

profile-page-ok

Question

diff --git a/spec/support/fixtures/vcr_cassettes/github_client_issue_access_token.yml b/spec/support/fixtures/vcr_cassettes/github_client_issue_access_token.yml index a7b71e8a4..a85b78200 100644 --- a/spec/support/fixtures/vcr_cassettes/github_client_issue_access_token.yml +++ b/spec/support/fixtures/vcr_cassettes/github_client_issue_access_token.yml @@ -87,7 +87,7 @@ http_interactions: properly when the colours are related.\r\n\r\nSee the pictures below or visit my profile [dev.to/catalinmpit](https://dev.to/catalinmpit).\r\n\r\n**To Reproduce**\r\n\r\n1. Go to [dev.to/catalinmpit](https://dev.to/catalinmpit)\r\n\r\n**Expected behavior**\r\n\r\nMy - name and other information should be visible.\r\n\r\n**Screenshots**\r\n\r\n![broken-profile-page](https://i.imgur.com/AJyM7tH.png)\r\n\r\n**Aditional + name and other information should be visible.\r\n\r\n**Screenshots**\r\n\r\n![broken-profile-page](https://i.imgur.com/AJyM7tH.png)\r\n\r\n**Additional information**\r\n\r\nPlayed around with the settings and I''ve done this:\r\n\r\n![profile-page-ok](https://i.imgur.com/DLiPXFT.png)\r\n\r\n**Question**\r\n\r\nWhat do you recommend to fix the issue? If you have any recommendations, I''m happy to pick the issue.\r\n","closed_by":null}' diff --git a/spec/support/fixtures/vcr_cassettes/reddit_liquid_tag.yml b/spec/support/fixtures/vcr_cassettes/reddit_liquid_tag.yml index 8ec9a6990..5ee65cbbe 100644 --- a/spec/support/fixtures/vcr_cassettes/reddit_liquid_tag.yml +++ b/spec/support/fixtures/vcr_cassettes/reddit_liquid_tag.yml @@ -3679,12 +3679,12 @@ http_interactions: false, "author": "cruzweb", "can_mod_post": false, "created_utc": 1547475284.0, "send_replies": true, "parent_id": "t1_ee1min0", "score": 63, "author_fullname": "t2_342dz", "report_reasons": null, "approved_by": null, "all_awardings": - [], "subreddit_id": "t5_2qzb6", "body": "Thank you so much for the well throught-out + [], "subreddit_id": "t5_2qzb6", "body": "Thank you so much for the well thought-out answer, definitely gives me a lot to consider as we look to book adventures this year! ", "edited": false, "author_flair_css_class": null, "is_submitter": false, "downs": 0, "author_flair_richtext": [], "author_patreon_flair": false, "body_html": "<div class=\"md\"><p>Thank you so much for the well - throught-out answer, definitely gives me a lot to consider as we look to book + thought-out answer, definitely gives me a lot to consider as we look to book adventures this year! </p>\n</div>", "gildings": {}, "collapsed_reason": null, "associated_award": null, "stickied": false, "author_premium": false, "subreddit_type": "public", "can_gild": true, "top_awarded_type": null, "author_flair_text_color": diff --git a/spec/support/shared_examples/api_analytics.rb b/spec/support/shared_examples/api_analytics.rb index d891b2971..0cbf55b93 100644 --- a/spec/support/shared_examples/api_analytics.rb +++ b/spec/support/shared_examples/api_analytics.rb @@ -86,7 +86,7 @@ RSpec.shared_examples "GET /api/analytics/:endpoint authorization examples" do | end end - context "when viewing your own organizaiton's single article's analytics" do + context "when viewing your own organization's single article's analytics" do it "responds with status 200 OK" do org_param = "&organization_id=#{org_article.organization.id}" diff --git a/spec/system/admin/admin_bans_or_warns_user_spec.rb b/spec/system/admin/admin_bans_or_warns_user_spec.rb index 2fa3547e7..b607034b3 100644 --- a/spec/system/admin/admin_bans_or_warns_user_spec.rb +++ b/spec/system/admin/admin_bans_or_warns_user_spec.rb @@ -63,7 +63,7 @@ RSpec.describe "Admin bans user", type: :system do expect(user.suspended?).to eq(true) expect(user.trusted).to eq(false) expect(user.warned?).to eq(false) - expect(user.has_role?(:tag_modertor)).to eq(false) + expect(user.has_role?(:tag_moderator)).to eq(false) end it "unsuspends user" do diff --git a/spec/system/admin/admin_manages_pages_spec.rb b/spec/system/admin/admin_manages_pages_spec.rb index 3e2245842..6a9ff7da8 100644 --- a/spec/system/admin/admin_manages_pages_spec.rb +++ b/spec/system/admin/admin_manages_pages_spec.rb @@ -100,11 +100,11 @@ RSpec.describe "Admin manages pages", type: :system do visit admin_pages_path end - it "shows the notice that the defaults have been overriden" do + it "shows the notice that the defaults have been overridden" do expect(page).to have_content("You will no longer receive updates on these pages from the Forem team") end - it "shows the overriden pages in the pages table" do + it "shows the overridden pages in the pages table" do within(".pages__table") do expect(page).to have_content("Terms of Use") expect(page).to have_content("Code of Conduct") diff --git a/spec/system/admin/admin_updates_tag_spec.rb b/spec/system/admin/admin_updates_tag_spec.rb index ed51b4ac2..7e2ee9805 100644 --- a/spec/system/admin/admin_updates_tag_spec.rb +++ b/spec/system/admin/admin_updates_tag_spec.rb @@ -5,7 +5,7 @@ RSpec.describe "Admin updates a tag", type: :system do let(:bg_color_hex) { "#000000" } let(:text_color_hex) { "#ffffff" } - context "when no colors have been choosen for the tag" do + context "when no colors have been chosen for the tag" do let(:tag) { create(:tag) } before do @@ -13,7 +13,7 @@ RSpec.describe "Admin updates a tag", type: :system do visit edit_admin_tag_path(tag.id) end - it "allows an Admin to succesfully update a tag", :aggregate_failures do + it "allows an Admin to successfully update a tag", :aggregate_failures do visit edit_admin_tag_path(tag.id) expect(page).to have_content("Edit details") check "Supported" @@ -39,7 +39,7 @@ RSpec.describe "Admin updates a tag", type: :system do end end - context "when colors have already been choosen for the tag" do + context "when colors have already been chosen for the tag" do let(:tag) { create(:tag, bg_color_hex: "#0000ff", text_color_hex: "#ff0000") } before do diff --git a/spec/system/articles/moderator_moderates_an_article_spec.rb b/spec/system/articles/moderator_moderates_an_article_spec.rb index d72930943..61f6b0129 100644 --- a/spec/system/articles/moderator_moderates_an_article_spec.rb +++ b/spec/system/articles/moderator_moderates_an_article_spec.rb @@ -27,8 +27,8 @@ RSpec.describe "Views an article", type: :system do end it "shows hidden comments on /mod" do - commentor = create(:user) - create(:comment, commentable: article, user: commentor, hidden_by_commentable_user: true) + commenter = create(:user) + create(:comment, commentable: article, user: commenter, hidden_by_commentable_user: true) visit "/#{user.username}/#{article.slug}/mod" expect(page).to have_content("Hidden Comments") expect(page).to have_selector("ul#hidden-comments") diff --git a/spec/system/authentication/user_logs_in_with_apple_spec.rb b/spec/system/authentication/user_logs_in_with_apple_spec.rb index 11fb7c3e6..810b949e1 100644 --- a/spec/system/authentication/user_logs_in_with_apple_spec.rb +++ b/spec/system/authentication/user_logs_in_with_apple_spec.rb @@ -120,7 +120,7 @@ RSpec.describe "Authenticating with Apple", vcr: { cassette_name: "fastly_sloan" end end - context "when a validation failure occurrs" do + context "when a validation failure occurs" do before do # A User is invalid if their name is more than 100 chars long OmniAuth.config.mock_auth[:apple].info.first_name = "X" * 101 diff --git a/spec/system/authentication/user_logs_in_with_facebook_spec.rb b/spec/system/authentication/user_logs_in_with_facebook_spec.rb index b81bacd82..4c712548e 100644 --- a/spec/system/authentication/user_logs_in_with_facebook_spec.rb +++ b/spec/system/authentication/user_logs_in_with_facebook_spec.rb @@ -36,7 +36,7 @@ RSpec.describe "Authenticating with Facebook" do end end - context "when using valid credentials but witholding email address" do + context "when using valid credentials but withholding email address" do before do OmniAuth.config.mock_auth[:facebook][:info].delete(:email) OmniAuth.config.mock_auth[:facebook][:extra][:raw_info].delete(:email) @@ -160,7 +160,7 @@ RSpec.describe "Authenticating with Facebook" do end end - context "when a validation failure occurrs" do + context "when a validation failure occurs" do before do # A User is invalid if their name is more than 100 chars long OmniAuth.config.mock_auth[:facebook].info.name = "X" * 101 diff --git a/spec/system/authentication/user_logs_in_with_forem_spec.rb b/spec/system/authentication/user_logs_in_with_forem_spec.rb index 45be4bc2d..b54afbdad 100644 --- a/spec/system/authentication/user_logs_in_with_forem_spec.rb +++ b/spec/system/authentication/user_logs_in_with_forem_spec.rb @@ -35,7 +35,7 @@ RSpec.describe "Authenticating with Forem" do end end - context "when using valid credentials but witholding email address" do + context "when using valid credentials but withholding email address" do before do OmniAuth.config.mock_auth[:forem][:info].delete(:email) OmniAuth.config.mock_auth[:forem][:extra][:raw_info].delete(:email) @@ -159,7 +159,7 @@ RSpec.describe "Authenticating with Forem" do end end - context "when a validation failure occurrs" do + context "when a validation failure occurs" do before do # A User is invalid if their name is more than 100 chars long OmniAuth.config.mock_auth[:forem].info.name = "X" * 101 diff --git a/spec/system/authentication/user_logs_in_with_github_spec.rb b/spec/system/authentication/user_logs_in_with_github_spec.rb index 2d6cb2a6d..02925fdfa 100644 --- a/spec/system/authentication/user_logs_in_with_github_spec.rb +++ b/spec/system/authentication/user_logs_in_with_github_spec.rb @@ -127,7 +127,7 @@ RSpec.describe "Authenticating with GitHub" do end end - context "when a validation failure occurrs" do + context "when a validation failure occurs" do before do # A User is invalid if their name is more than 100 chars long OmniAuth.config.mock_auth[:github].extra.raw_info.name = "X" * 101 diff --git a/spec/system/authentication/user_logs_in_with_twitter_spec.rb b/spec/system/authentication/user_logs_in_with_twitter_spec.rb index c72b509cc..5d4315520 100644 --- a/spec/system/authentication/user_logs_in_with_twitter_spec.rb +++ b/spec/system/authentication/user_logs_in_with_twitter_spec.rb @@ -123,7 +123,7 @@ RSpec.describe "Authenticating with Twitter" do end end - context "when a validation failure occurrs" do + context "when a validation failure occurs" do before do # A User is invalid if their name is more than 100 chars long OmniAuth.config.mock_auth[:twitter].extra.raw_info.name = "X" * 101 diff --git a/spec/system/feedback_message_spec.rb b/spec/system/feedback_message_spec.rb index 062d288ba..1204636c8 100644 --- a/spec/system/feedback_message_spec.rb +++ b/spec/system/feedback_message_spec.rb @@ -10,7 +10,7 @@ RSpec.describe "Feedback report by chat channel messages", type: :system do sign_in user end - it "feedback messahe should increase by one", js: true do + it "feedback message should increase by one", js: true do expect do post "/feedback_messages", params: { feedback_message: { diff --git a/spec/system/organization/user_leaves_an_organization_spec.rb b/spec/system/organization/user_leaves_an_organization_spec.rb index 25bbb963c..80e3e83da 100644 --- a/spec/system/organization/user_leaves_an_organization_spec.rb +++ b/spec/system/organization/user_leaves_an_organization_spec.rb @@ -10,7 +10,7 @@ RSpec.describe "User leaves an organization", type: :system do end context "when user visits member organization settings" do - it "shows the leave oranization button", js: true do + it "shows the leave organization button", js: true do expect(page).to have_button("Leave Organization") end end diff --git a/spec/system/tags/user_updates_a_tag_spec.rb b/spec/system/tags/user_updates_a_tag_spec.rb index 0cd6dc331..9a14effe8 100644 --- a/spec/system/tags/user_updates_a_tag_spec.rb +++ b/spec/system/tags/user_updates_a_tag_spec.rb @@ -9,7 +9,7 @@ RSpec.describe "User updates a tag", type: :system do describe "Update tag as a super_admin" do let(:tag) { create(:tag) } - context "when no colors have been choosen for the tag" do + context "when no colors have been chosen for the tag" do before do sign_in super_admin visit edit_tag_path(tag.name) @@ -29,7 +29,7 @@ RSpec.describe "User updates a tag", type: :system do end end - context "when colors have already been choosen for the tag" do + context "when colors have already been chosen for the tag" do let(:tag) { create(:tag, bg_color_hex: "#0000ff", text_color_hex: "#ff0000") } before do @@ -52,7 +52,7 @@ RSpec.describe "User updates a tag", type: :system do describe "Update tag as a tag_moderator" do let(:tag) { create(:tag) } - context "when no colors have been choosen for the tag" do + context "when no colors have been chosen for the tag" do before do tag_moderator.add_role(:tag_moderator, tag) sign_in tag_moderator @@ -73,7 +73,7 @@ RSpec.describe "User updates a tag", type: :system do end end - context "when colors have already been choosen for the tag" do + context "when colors have already been chosen for the tag" do let(:tag) { create(:tag, bg_color_hex: "#0000ff", text_color_hex: "#ff0000") } before do diff --git a/spec/system/user/user_settings_response_templates_spec.rb b/spec/system/user/user_settings_response_templates_spec.rb index ccfd69d7b..dea7f17fa 100644 --- a/spec/system/user/user_settings_response_templates_spec.rb +++ b/spec/system/user/user_settings_response_templates_spec.rb @@ -18,7 +18,7 @@ RSpec.describe "User uses response templates settings", type: :system do expect(page).to have_current_path "/settings/response-templates/#{response_template.id}", ignore_query: true end - it "shows the proper message when deleting a reponse template", js: true do + it "shows the proper message when deleting a response template", js: true do visit "/settings/extensions" expect(page).to have_text(response_template.title) diff --git a/spec/workers/data_update_worker_spec.rb b/spec/workers/data_update_worker_spec.rb index 5169959e0..0a29aab1f 100644 --- a/spec/workers/data_update_worker_spec.rb +++ b/spec/workers/data_update_worker_spec.rb @@ -46,10 +46,10 @@ RSpec.describe DataUpdateWorker, type: :worker do worker.perform end.to change(DataUpdateScript, :count).by(2) - successsful_dus = DataUpdateScript.find_by(status: :succeeded) - expect(successsful_dus.finished_at).not_to be_nil - expect(successsful_dus.run_at).not_to be_nil - expect(successsful_dus.error).to be_nil + successful_dus = DataUpdateScript.find_by(status: :succeeded) + expect(successful_dus.finished_at).not_to be_nil + expect(successful_dus.run_at).not_to be_nil + expect(successful_dus.error).to be_nil failed_dus = DataUpdateScript.find_by(status: :failed) expect(failed_dus.finished_at).not_to be_nil diff --git a/spec/workers/webhook/destroy_worker_spec.rb b/spec/workers/webhook/destroy_worker_spec.rb index 3633375be..4cc824f67 100644 --- a/spec/workers/webhook/destroy_worker_spec.rb +++ b/spec/workers/webhook/destroy_worker_spec.rb @@ -8,7 +8,7 @@ RSpec.describe Webhook::DestroyWorker, type: :worker do let(:worker) { subject } describe "#perform_now" do - it "destrous webhook by user_id and app_id" do + it "destroys webhook by user_id and app_id" do worker.perform(user.id, oauth_app.id) expect(Webhook::Endpoint.find_by(id: webhook_endpoint.id)).to be_nil expect(other_webhook_endpoint.reload).to be_present