Spelling (#15702)
* spelling: access Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: additional Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: administrative Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: aggregate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: assigns Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: attributes Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: autocomplete Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: because Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: between Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: bootstrap Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: calculating Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: captcha Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: character Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: chosen Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: commenter Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: competitor Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: componentize Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: contrast Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: corresponding Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: description Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: destroyed Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: destroys Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: discussion Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: episode Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: escaped Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: evaluates Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: expired Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: explicitly Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: facebook Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: fragment Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: functionality Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: improper Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: incentive Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: interfere Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: latest Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: message Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: minimum Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: moderator Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: mouseover Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: mutual Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: notification Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: occasionally Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: occurrence Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: occurs Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: octokit Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: offset Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: omitted Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: opacity Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: organization Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: organizations Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: overridden Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: override Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: overriding Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: prefill Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: previous Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: profile Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: recycling Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: registered Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: repositories Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: rescuing Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: response Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: returns Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: second Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: separator Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: services Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: subscriber Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: subscription Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: success Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: successful Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: successfully Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: suppress Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: test Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: thought Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: uniqueness Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unknown Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unproductive Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unreachable Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unsuccessful Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: utilities Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: utility Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: valid Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: voluntarily Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: vomited Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: website Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: withholding Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
parent
00324c38e6
commit
0403e78f08
98 changed files with 153 additions and 153 deletions
|
|
@ -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 <return>
|
||||
// twice in order to follow a focused link.
|
||||
function focusListener(e) {
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
}
|
||||
|
||||
.close {
|
||||
// Overide standard button layout
|
||||
// Override standard button layout
|
||||
background: none;
|
||||
border: none;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
// New/Edit Listing form
|
||||
// Tags dropdown
|
||||
// TODO: componetize styling..
|
||||
// TODO: componentize styling..
|
||||
|
||||
.listingform {
|
||||
&__tagsoptions {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -307,8 +307,8 @@ export class ArticleForm extends Component {
|
|||
|
||||
this.setState({
|
||||
// When the formKey prop changes, it causes the <Form /> 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 || '',
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ describe('<ImageUploader />', () => {
|
|||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ describe('<Button /> component', () => {
|
|||
expect(container.innerHTML).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should render a button with addtional CSS classes when className is set', () => {
|
||||
it('should render a button with additional CSS classes when className is set', () => {
|
||||
const { container } = render(
|
||||
<Button disabled className="some-additional-class-name">
|
||||
Hello world!
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ exports[`<Button /> component should render a button as a specific button type (
|
|||
|
||||
exports[`<Button /> component should render a button as an anchor element if "tagName" is set to "a" 1`] = `"<a class=\\"crayons-btn\\" href=\\"https://dev.to\\">Hello world!</a>"`;
|
||||
|
||||
exports[`<Button /> component should render a button with addtional CSS classes when className is set 1`] = `"<button class=\\"crayons-btn some-additional-class-name\\" type=\\"button\\" disabled=\\"\\">Hello world!</button>"`;
|
||||
exports[`<Button /> component should render a button with additional CSS classes when className is set 1`] = `"<button class=\\"crayons-btn some-additional-class-name\\" type=\\"button\\" disabled=\\"\\">Hello world!</button>"`;
|
||||
|
||||
exports[`<Button /> component should render a button with with an icon when an icon is set and there is button text 1`] = `"<button class=\\"crayons-btn crayons-btn--icon-left\\" type=\\"button\\"><svg width=\\"24\\" height=\\"24\\" xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"crayons-icon\\"><path d=\\"M9.99999 15.172L19.192 5.979L20.607 7.393L9.99999 18L3.63599 11.636L5.04999 10.222L9.99999 15.172Z\\"></path></svg>Hello world!</button>"`;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 `<span>` elements correseponding to the slides, and adds an "active"
|
||||
* It builds a list of `<span>` 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.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* "attribute_name": "website_url",
|
||||
* "description": null,
|
||||
* "input_type": "text_input",
|
||||
* "label": "Webiste URL",
|
||||
* "label": "Website URL",
|
||||
* "placeholder_text": ""
|
||||
*}
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(/(?<!\\)"/, "\\\"")
|
||||
"#{section}: \"#{parsed_text}\"\n"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ module Notifications
|
|||
)
|
||||
end
|
||||
|
||||
# Send PNs using Rpush - respecting users' notificaton delivery settings
|
||||
# Send PNs using Rpush - respecting users' notification delivery settings
|
||||
targets = User.joins(:notification_setting)
|
||||
.where(id: user_ids, notification_setting: { mobile_comment_notifications: true }).ids
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ module Users
|
|||
delete_feedback_messages(user)
|
||||
end
|
||||
|
||||
# delete_all will nullify the corresponding foreign_key field bacause of the dependent: :nullify strategy
|
||||
# delete_all will nullify the corresponding foreign_key field because of the dependent: :nullify strategy
|
||||
def delete_feedback_messages(user)
|
||||
user.offender_feedback_messages.delete_all
|
||||
user.reporter_feedback_messages.delete_all
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class UniqueCrossModelSlugValidator < ActiveModel::EachValidator
|
|||
# @return [TrueClass] if the value already exists across the various classes.
|
||||
# @return [FalseClass] if the given value is not already used.
|
||||
#
|
||||
# @see CLASS_AND_ATTRIBUTE_NAME_FOR_UNIQUNESS_TEST
|
||||
# @see CLASS_AND_ATTRIBUTE_NAME_FOR_UNIQUENESS_TEST
|
||||
def already_exists?(value:, record:)
|
||||
return false unless value
|
||||
return true if value.include?("sitemap-")
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ 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: <https://github.com/mbleigh/acts-as-taggable-on/issues/91>
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -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: <https://github.com/mbleigh/acts-as-taggable-on/issues/91>
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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/)
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with initialpath" do
|
||||
it "accepts a valid id with initialpath" do
|
||||
liquid = generate_tag(valid_id_with_initialpath)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with module" do
|
||||
it "accepts a valid id with module" do
|
||||
liquid = generate_tag(valid_id_with_module)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with view" do
|
||||
it "accepts a valid id with view" do
|
||||
liquid = generate_tag(valid_id_with_view)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with runonclick" do
|
||||
it "accepts a valid id with runonclick" do
|
||||
liquid = generate_tag(valid_id_with_runonclick)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with initialpath and module" do
|
||||
it "accepts a valid id with initialpath and module" do
|
||||
liquid = generate_tag(valid_id_with_initialpath_and_module)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with initialpath and view" do
|
||||
it "accepts a valid id with initialpath and view" do
|
||||
liquid = generate_tag(valid_id_with_initialpath_and_view)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with initialpath and runonclick" do
|
||||
it "accepts a valid id with initialpath and runonclick" do
|
||||
liquid = generate_tag(valid_id_with_initialpath_and_runonclick)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with runonclick and module" do
|
||||
it "accepts a valid id with runonclick and module" do
|
||||
liquid = generate_tag(valid_id_with_runonclick_and_module)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with runonclick and view" do
|
||||
it "accepts a valid id with runonclick and view" do
|
||||
liquid = generate_tag(valid_id_with_runonclick_and_view)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with initialpath and module and runonclick" do
|
||||
it "accepts a valid id with initialpath and module and runonclick" do
|
||||
liquid = generate_tag(valid_id_with_initialpath_and_module_and_runonclick)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with initialpath and module and runonclick and view" do
|
||||
it "accepts a valid id with initialpath and module and runonclick and view" do
|
||||
liquid = generate_tag(valid_id_with_initialpath_and_module_and_runonclick_and_view)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
||||
it "accepts a vaild id with special_characters of / . @ % _" do
|
||||
it "accepts a valid id with special_characters of / . @ % _" do
|
||||
liquid = generate_tag(valid_id_with_special_characters)
|
||||
expect(liquid.render).to include("<iframe")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ RSpec.describe ListingTag, type: :liquid_tag do
|
|||
:listing,
|
||||
user_id: user.id,
|
||||
title: "this old af",
|
||||
body_markdown: "exxpired",
|
||||
processed_html: "<p>exxpired</p>",
|
||||
body_markdown: "expired",
|
||||
processed_html: "<p>expired</p>",
|
||||
tag_list: %w[x y z],
|
||||
organization_id: nil,
|
||||
bumped_at: datetime,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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("<a class=\"twitter-timeline")
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ RSpec.describe UserSubscriptionTag, type: :liquid_tag do
|
|||
expect(page).to have_css("#user-subscription-confirmation-modal", visible: :visible)
|
||||
end
|
||||
|
||||
it "displays a sucess message when a subscription is created" do
|
||||
it "displays a success message when a subscription is created" do
|
||||
expect(page).to have_css("#subscription-signed-out", visible: :hidden)
|
||||
expect(page).to have_css("#subscriber-apple-auth", visible: :hidden)
|
||||
expect(page).to have_css("#response-message", visible: :hidden)
|
||||
|
|
|
|||
|
|
@ -1199,7 +1199,7 @@ RSpec.describe Article, type: :model do
|
|||
end
|
||||
|
||||
context "when article does not have any comments" do
|
||||
it "retrns empty set if there aren't any top comments" do
|
||||
it "returns empty set if there aren't any top comments" do
|
||||
expect(article.top_comments).to be_empty
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ RSpec.describe Comment, type: :model do
|
|||
expect(comment.processed_html.include?("/#{user.username}")).to be(true)
|
||||
end
|
||||
|
||||
it "does case insentive mention recognition" do
|
||||
it "does case incentive mention recognition" do
|
||||
comment.body_markdown = "Hello @#{user.username.titleize}, you are cool."
|
||||
comment.validate!
|
||||
expect(comment.processed_html.include?("/#{user.username}")).to be(true)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ RSpec.describe DisplayAdEvent, type: :model do
|
|||
expect(event).to be_valid
|
||||
end
|
||||
|
||||
it "is not valid with an uknown category" do
|
||||
it "is not valid with an unknown category" do
|
||||
event = build(:display_ad_event, category: "wazoo", user: user, display_ad: display_ad)
|
||||
expect(event).not_to be_valid
|
||||
end
|
||||
|
|
|
|||
|
|
@ -105,13 +105,13 @@ RSpec.describe Settings::Base, type: :model do
|
|||
end
|
||||
|
||||
context "when coercing arrays" do
|
||||
it "splits strings into arrays based on the specified seprator" do
|
||||
it "splits strings into arrays based on the specified separator" do
|
||||
expect { TestSetting.default_tags = "test1:test2" }
|
||||
.to change(TestSetting, :default_tags)
|
||||
.from([]).to %w[test1 test2]
|
||||
end
|
||||
|
||||
it "splits strings into arrays based on the default seprator if no separator is specified" do
|
||||
it "splits strings into arrays based on the default separator if no separator is specified" do
|
||||
expect { TestSetting.admin_emails = "test1@example.com,test2@example.com" }
|
||||
.to change(TestSetting, :admin_emails)
|
||||
.from(["admin@example.com"]).to %w[test1@example.com test2@example.com]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ require "rails_helper"
|
|||
|
||||
RSpec.describe Settings::UserExperience do
|
||||
describe "validating hex string format" do
|
||||
it "allows 3 chacter hex strings" do
|
||||
it "allows 3 character hex strings" do
|
||||
expect do
|
||||
described_class.primary_brand_color_hex = "#000"
|
||||
end.not_to raise_error
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ RSpec.shared_examples "UserSubscriptionSourceable" do
|
|||
let(:subscriber) { create(:user) }
|
||||
|
||||
describe "#build_user_subscription" do
|
||||
it "returns a new UserSubcription with the correct attributes" do
|
||||
it "returns a new UserSubscription with the correct attributes" do
|
||||
new_user_subscription = UserSubscription.new(
|
||||
user_subscription_sourceable: source,
|
||||
author_id: source.user_id,
|
||||
|
|
@ -23,9 +23,9 @@ RSpec.shared_examples "UserSubscriptionSourceable" do
|
|||
end
|
||||
|
||||
describe "#create_user_subscription" do
|
||||
it "returns a created UserSubcription with the correct attributes" do
|
||||
user_subscription_fields = %w[author_id subsciber_id subscriber_email user_subscription_sourceable_id
|
||||
user_susbcription_sourceable_type]
|
||||
it "returns a created UserSubscription with the correct attributes" do
|
||||
user_subscription_fields = %w[author_id subscriber_id subscriber_email user_subscription_sourceable_id
|
||||
user_subscription_sourceable_type]
|
||||
|
||||
user_subscription = create(
|
||||
:user_subscription,
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ RSpec.describe Tweet, type: :model, vcr: true do
|
|||
expect(tweet.last_fetched_at).to be_present
|
||||
end
|
||||
|
||||
it "is assignes to the existing user if the screen name corresponds" do
|
||||
it "is assigns to the existing user if the screen name corresponds" do
|
||||
user = create(:user, twitter_username: "ThePracticalDev")
|
||||
|
||||
tweet = described_class.find_or_fetch(tweet_id)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ RSpec.describe UserSubscription, type: :model do
|
|||
end
|
||||
|
||||
describe "#build" do
|
||||
it "returns a new UserSubcription with the correct attributes" do
|
||||
it "returns a new UserSubscription with the correct attributes" do
|
||||
new_user_subscription = described_class.new(
|
||||
user_subscription_sourceable: source,
|
||||
author_id: source.user_id,
|
||||
|
|
@ -86,7 +86,7 @@ RSpec.describe UserSubscription, type: :model do
|
|||
end
|
||||
|
||||
describe "#make" do
|
||||
it "returns a created UserSubcription with the correct attributes" do
|
||||
it "returns a created UserSubscription with the correct attributes" do
|
||||
factory_user_subscription = described_class.make(source: source, subscriber: subscriber)
|
||||
|
||||
expect(factory_user_subscription.user_subscription_sourceable).to eq source
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ RSpec.describe "/admin/customization/config", type: :request do
|
|||
end
|
||||
|
||||
it "does not allow improper domain list" do
|
||||
impproper_list = "dev.to, foremcom, forem.dev"
|
||||
improper_list = "dev.to, foremcom, forem.dev"
|
||||
post admin_settings_authentications_path, params: {
|
||||
settings_authentication: { allowed_registration_email_domains: impproper_list }
|
||||
settings_authentication: { allowed_registration_email_domains: improper_list }
|
||||
}
|
||||
expect(Settings::Authentication.allowed_registration_email_domains).not_to eq(%w[dev.to foremcom forem.dev])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ RSpec.describe "/admin/content_manager/organizations", type: :request do
|
|||
end
|
||||
end
|
||||
|
||||
describe "GET /admin/orgnaizations/:id" do
|
||||
describe "GET /admin/organizations/:id" do
|
||||
it "renders the correct organization" do
|
||||
get admin_organization_path(organization.id)
|
||||
expect(response.body).to include(CGI.escapeHTML(organization.name))
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ RSpec.describe "/admin", type: :request do
|
|||
allow(FeatureFlag).to receive(:enabled?).and_call_original
|
||||
end
|
||||
|
||||
describe "Last deployed and Lastest Commit ID card" do
|
||||
describe "Last deployed and Latest Commit ID card" do
|
||||
before do
|
||||
ForemInstance.instance_variable_set(:@deployed_at, nil)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ RSpec.describe "ArticlesDestroy", type: :request do
|
|||
sign_in user
|
||||
end
|
||||
|
||||
it "destroyes an article" do
|
||||
it "destroyed an article" do
|
||||
delete "/articles/#{article.id}"
|
||||
destroyed_article = Article.find_by(id: article.id)
|
||||
expect(destroyed_article).to be_nil
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ RSpec.describe "Articles", type: :request do
|
|||
expect(response.body).to include('<link rel="canonical" href="http://localhost:3000/new" />')
|
||||
end
|
||||
|
||||
it "sets canonical url with prefil" do
|
||||
it "sets canonical url with prefill" do
|
||||
get "/new?prefill=dsdweewewew"
|
||||
expect(response.body).to include('<link rel="canonical" href="http://localhost:3000/new" />')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)}",
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Format: 
|
|||
* TEST1
|
||||
* TEST1.1
|
||||
* TEST1.1.1
|
||||
* TESET1.1.3
|
||||
* TEST1.1.3
|
||||
|
||||
2. **Line break in ul/ol spacing test 2**
|
||||
* ITEM 1
|
||||
|
|
|
|||
|
|
@ -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\r\n\r\n**Aditional
|
||||
name and other information should be visible.\r\n\r\n**Screenshots**\r\n\r\n\r\n\r\n**Additional
|
||||
information**\r\n\r\nPlayed around with the settings and I''ve done this:\r\n\r\n\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\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\r\n\r\n**Additional
|
||||
information**\r\n\r\nPlayed around with the settings and I''ve done this:\r\n\r\n\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:
|
|||
<p>My name and other information should be visible.</p>
|
||||
<p><strong>Screenshots</strong></p>
|
||||
<p><a href="https://camo.githubusercontent.com/92af1284df38dd307a8b30ccafbea9f832a82d61/68747470733a2f2f692e696d6775722e636f6d2f414a794d3774482e706e67" target="_blank" rel="nofollow"><img src="https://camo.githubusercontent.com/92af1284df38dd307a8b30ccafbea9f832a82d61/68747470733a2f2f692e696d6775722e636f6d2f414a794d3774482e706e67" alt="broken-profile-page" data-canonical-src="https://i.imgur.com/AJyM7tH.png" style="max-width:100%;"></a></p>
|
||||
<p><strong>Aditional information</strong></p>
|
||||
<p><strong>Additional information</strong></p>
|
||||
<p>Played around with the settings and I've done this:</p>
|
||||
<p><a href="https://camo.githubusercontent.com/b2d23465b39fd003c0121c1b87177673d4d96336/68747470733a2f2f692e696d6775722e636f6d2f444c69505846542e706e67" target="_blank" rel="nofollow"><img src="https://camo.githubusercontent.com/b2d23465b39fd003c0121c1b87177673d4d96336/68747470733a2f2f692e696d6775722e636f6d2f444c69505846542e706e67" alt="profile-page-ok" data-canonical-src="https://i.imgur.com/DLiPXFT.png" style="max-width:100%;"></a></p>
|
||||
<p><strong>Question</strong></p>
|
||||
|
|
|
|||
|
|
@ -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\r\n\r\n**Aditional
|
||||
name and other information should be visible.\r\n\r\n**Screenshots**\r\n\r\n\r\n\r\n**Additional
|
||||
information**\r\n\r\nPlayed around with the settings and I''ve done this:\r\n\r\n\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}'
|
||||
|
|
|
|||
|
|
@ -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":
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue