Commit graph

3131 commits

Author SHA1 Message Date
Arit Amana
9c92ce03dc
Implement Loom Embed (not merging now) (#16633)
* started implementation and specs

* complete implementation and specs

* refactor

* update doc

* fix failing specs

* typos will NOT be the death of me
2022-02-22 09:05:55 -05:00
Jeremy Friesen
d055613676
Adjusting ArticlePolicy for admin only posting (#16614)
* Adjusting ArticlePolicy for admin only posting

The goal of this commit is actually two fold:

1) To add documentation regarding my current emerging understanding of
   our caching implementation as it relates to our authorization and
   authentication.
2) Flippiing "on" the feature's core authorization check.

Buried within this is the desired normalization of the authorization
between the `ArticlePolicy`'s `#create?`, `#preview?`, `#new?`.

My testing plan for this is to ask for SRE to spin-up a canary, then
test.  What does that look like?  I'm uncertain because this is nudge
closer towards our edge-caching strategy.  Which makes robust testing
more difficult.

Closes forem/forem#16483
Related to #16529, #16571, #16536, #16529
Informs #16490, #16606

* Update spec/requests/editor_spec.rb

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
2022-02-21 10:09:13 -05:00
Jeremy Friesen
909766c049
Adjusting suspended user authorizations (#16634)
Closes forem/forem#16537
2022-02-21 10:08:24 -05:00
Suzanne Aitchison
b358c3810c
Revert "Only make one network call to fetch all existing tags in editor (#16610)" (#16641)
This reverts commit c76909a428.
2022-02-18 11:54:38 +00:00
Daniel Uber
293ff5653a
Fix integer > nil error when sending reaction notifications (#16627)
* don't set nil when size not called

recently, #16570 worked around an issue where aggregated siblings
wasn't present, by only calling size if present.

Unfortunately, this causes a comparison of integer (new json_data
aggregated siblings count) with nil (result of the safe navigation for dig()&.size
assigned nil to previous_siblings_size, when we expected it to be
0). The initial error on the same data moved farther down the controller.

If old_json_data is present, but does not have an array in
reaction.aggregated_siblings, we want to have previous size be zero.

Remove guard clause and previous assignment

The issue was not that old_json_data was nil (it came from an existing
notification) but that there were missing keys (or rather that the
json data for some notifications didn't have a reaction key at all).

Remove the guard clause and either set to the size, or zero if there
is none. I don't understand what the guard clause was for, so replace the
safety by adding a nil safe call to dig. I don't _believe_ this is
possible but in case it was we can shorten the check here.

* Add test to cover missing json_data['reaction'] key

* Remove unneeded temporary variable
2022-02-17 16:30:39 -06:00
Daniel Uber
41ab94eaae
Show missing translation keys when test fails (#16637)
* report key and path for missing keys

* move iteration out of the string into the method

* make the details common to the missing and unused lists
2022-02-17 16:21:29 -06:00
Ben Halpern
66b32215f3
Small win: Add "Feature post" button alongside new "admin actions" drawer in mod panel. (#16544)
* Initial hack

* Begin functionality implementation

* Add proper route

* Finish up

* Fix test and formatting

* Fix test vars

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/controllers/articles_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Update file to not use keys that are not needed

* Finalize featured logic

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-17 12:43:27 -05:00
Suzanne Aitchison
591981466b
remove detect_animated_images feature flag (#16621) 2022-02-17 15:27:48 +00:00
Suzanne Aitchison
2fd5de8383
Use new ColorPicker in tag edit form (#16607)
* Use new ColorPicker in tag edit form

* use classnames, add comment
2022-02-17 14:59:09 +00:00
Suzanne Aitchison
c76909a428
Only make one network call to fetch all existing tags in editor (#16610)
* use bulk get of tags in editor

* prefer tag_ids if both tag_ids and tag_names are present
2022-02-17 14:57:40 +00:00
Arit Amana
29bb7b4e75
Complete implementation and add specs (#16615) 2022-02-16 18:10:58 -05:00
Ridhwana
b21397a8c6
"Reply to" and "From" Email addresses for SMTP Configurations (#16499)
* feat: create a from_email_address and a reply_to_email_address

* feat: update other mailers with the new SMTP email settings

* test: update all spec files

* fix: use the SMTP::Settings value

* fix tests

* spec: fix the comma

* feat: tighten some logic

* fix: test

* fix tests

* fix tests

* final fix test commit

* fix test

* fix test

* oops

* feat: add a reply_to for Devise Mailer

* chore: update the description

* use a proc for reply_to

* feat: update text

* Update spec/mailers/digest_mailer_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update spec/mailers/verification_mailer_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update spec/mailers/shared_examples/renders_proper_email_headers.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* refactor: move OPTIONS to a helper as its only being used in the view layer

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2022-02-16 16:14:54 +02:00
Jeremy Friesen
955d9ee51a
Plumbing application for probable AuthN/Z changes (#16571)
* Plumbing application for probable AuthN/Z changes

For further details, core members can read:

- [Forem Article Authorization Discrepencies][1]
- [Forem Authentication and Authorization Principles][2]

(Note: there's nothing "private" about these articles, I happened to
post them on https://forem.team for internal discussion.)

Related to #16529

[1]:https://forem.team/jeremy/forem-article-authorization-discrepencies-45df
[2]:https://forem.team/jeremy/forem-authentication-and-authorization-principles-58l3

* Adding changes based on feedback
2022-02-16 09:10:18 -05:00
Ridhwana
1025900d16
Improve the UX of the SMTP Section (#16223)
* feat: allow reply_to and email_from to be set for an SMTP config

* feat: use these SMTP values in the mailers

* spec: test the application_mailer

* fix: validate with email, and not url

* feat: mimic macs changes from https://github.com/forem/forem/pull/16216 to use in this PR

* setup packs for admin

* refactor: order the keys and add a const for the auth methods

* feat: rename the header to a more user friendlly name

* chore: move the section with Emails

* feat: add a toggle that will show and hide the SMTP form under certain conditions

* feat: add the javaScript to handle the toggles

* feat: add a better description until we convert to a dropdown

* feat: ensure that we have declared sendgrid_enabled

* chore: add  anote to the config controller

* chore: remove references of the email addresses to keep brnach scoped

* feat: tweak js

* test: cypress workflow to update smtp settings

* feat : update the smtp tests

* remove comments

* update test

* chore: rename NOTE

* feat: polisha dn test ForemInstance.only_sendgrid_enabled?

* chore: remove specs

* Update app/lib/constants/settings/smtp.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update spec/system/admin/config/admin_updates_smtp_settings_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update spec/system/admin/config/admin_updates_smtp_settings_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update spec/system/admin/config/admin_updates_smtp_settings_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update app/javascript/packs/admin/config/smtp.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* refactor js as per comments

* refactor as per comments

* Update cypress/integration/seededFlows/adminFlows/config/emailServerSettingsSection.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* refactor: update the Cypress tests

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-02-15 18:40:14 +02:00
Jeremy Friesen
c25435e596
Refactoring shared context to remove assumption (#16573)
Related to #16483
2022-02-15 11:32:49 -05:00
Ridhwana
5e93d3a25e
Add a contact email address to the /admin/customization/config (#16497)
* feat: remove the default email and cobine the periodic digest and the contact email under the Email section

* refactor: rename  the email_link to contact link and use the contact_email as a default and fallback to the ForemInstance.email

* chore: alignment

* feat: use the contact_email helper

* feat: move the contact_email to the ForemInstance model

* feat: use ForemInstance.contact_email instead of the application helper method

* removed the application Helper

* feat: set the dafault on the contact_email

* fix: cypress tests

* Update app/lib/constants/settings/general.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-15 17:37:08 +02:00
Daniel Uber
afa214ac52
Require profile fields to belong to a group (#16390)
* Require profile fields to belong to a group

Remove the empty group dropdown from the group select tag

Remove the optional: true from the belongs_to validation (raise a
validation error on save if the group is not provided)

Update test to remove belongs_to's optional setting

* Update ProfileFields::Add spec to include profile field group

* update factory to ensure a non-empty profile field group

* Add required profile field group to seeded profile fields

Since profile field is required, create was failing (silently).

Add required field so these are available in e2e tests.

* Use factory `association` to create a profile field group

https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#explicit-definition

* provide required profile field group when posting data

* Fix one spec, drop another

Both of these scripts will be removed in the other branch (changing
the attribute name) - dropping the test here seems lower trouble than
modifying an out of data data update script to pass.

* skip test slated for removal

Similar to the last commit - this test exercises a script about to be
archived in the other branch.
2022-02-15 09:27:18 -06:00
Suzanne Aitchison
3982b389f1
Rework user subscription liquid tag to avoid errors (#16460)
* move script to packs, strip ids

* make sure userdata is available before determining ui

* stop working around old html, fix duplicate ID errors

* skip login modal

* remove DEV hard coding

* replace system spec with cypress spec

* update base_data to include apple auth info, add to cypress tests

* add initial version of DUS to resave HTML

* remove data update script
2022-02-15 09:14:03 +00:00
Michael Kohl
d5ecf61ee4
Admin API use case 1: endpoint to create users (#16520) 2022-02-15 09:30:00 +07:00
Marcelo Kopmann
292383175b
Fix Github Liquid Tag from repositories with dot character (#16551)
* fix: add dot character in github liquid tag regex

* fix: remove redundant escape inside regexp literal
2022-02-14 16:15:09 -05:00
Jamie Gaskins
66846c7a17
Fix NoMethodError on Nil for article preview (#16569)
* Fix NoMethodError on Nil for article preview

* Remove commented out debugging code
2022-02-14 14:38:29 -05:00
Jeremy Friesen
cf53758476
Removing Articles::Builder making policy decision (#16536)
* Removing Articles::Builder making policy decision

This change is a refactoring through triangulation.  Given that
`ArticlePolicy#new?` returned true, I'm prepared to assume that calling
`authorize(Article)` in all cases is acceptable.

So to narrow the Builder making a policy decision I renamed the returned
value to reflect what it was actually doing in the logic.  And in
renaming, flipped the polarity of the boolean.  Why the flip?  Because
`needs_authorization == !store_location`.

In consultation with Allison and Jennie, I'm proceeding with a short-cut
to get me unstuck.  That unstuck is namely "I need to ensure that the
articles#new action can go through authorization."

Given that I'll be spending time in the authorization layer, I hope
these noted short-cuts and comments will be useful in future spelunking
efforts regarding authorization.

Closes #16529

* Update app/policies/article_policy.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Disabling spec

* Update app/policies/article_policy.rb

Co-authored-by: Dwight Scott <dwight@forem.com>

* Update app/policies/article_policy.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Dwight Scott <dwight@forem.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-14 11:39:22 -05:00
Nick Taylor
7e1869f1d1
Added E2E tests for new admin member details view (#16513) 2022-02-11 08:47:01 -05:00
Nick Taylor
bfbe90cfbe
Now Bg color hex is labeled Tag Color (#16492) 2022-02-11 08:31:57 -05:00
Michael Kohl
a91e505051
Add FeatureFlag.all (#16496) 2022-02-11 13:38:17 +07:00
Julianna Tetreault
89706527b0
Remove "New Admin Member"-Related Code (#16475)
* Removes code behind new_admin_members feature flag

* Removes components/admin/users/tools/* and the tools components

* Removes unused /admin/users/tools/* controllers, comments, and routes

* Removes New Member View-related E2E and RSpec specs

* Remove admin_users_tools.rb frin spec/support/shared_examples/

* Removes remaining component-related specs

* Removes the view_component gem and test helper

* Resolve merge conflicts in Admin::UsersController

* Removes the view_component gem, as it is no longer used

* Removes view_component from Gemfile.lock
2022-02-10 06:42:56 -07:00
Jeremy Friesen
e6244b7f7e
Adding feature flag for Authorization 1-1 (#16518)
As written in the comments, we're looking at making the smallest change
to deliver on the feature.  The other goal is to move from our
`user.admin?` paradigm towards leveraging Pundit policies.

If we need to move beyond Pundit, it will be easier once we've moved
all of our `user.something_something?` to policy questions.  And please
note, I don't know if we'll move past pundit.

See [Authorization System: use case 1-1 project][1] for details on the
project.

Closes #16483

[1]:https://github.com/orgs/forem/projects/46/views/1
2022-02-10 08:13:41 -05:00
Jeremy Friesen
30ff24393c
Allowing dependency injection for LiquidTag policy (#16511)
This is the least effort I can presently think of to allow for us to
reprocess user article's and handle the scenario in which the user may
have once had permission to the liquid tag but no longer.

This DI is not something I imagine using, but may highlight a better
approach for liquid tag permissions.

Related to #12146 and #16460
2022-02-10 07:47:16 -05:00
Arit Amana
ddfdecfab9
Implement Unified Embeds for Forem-specific URLs (#16512)
* complete implementation; specs and refactor remain

* add specs (failing right now)

* complete implementation; add spec

* fix failing spec

* missed some specs that needed to go

* PR review comments

* specs covering forem_tag.rb
2022-02-09 18:35:14 -05:00
Dwight Scott
509e7d0e78
Modify tags api index to allow for bulk GET of tags (#16417) 2022-02-09 15:30:15 -05:00
Jeremy Friesen
42b39da1a8
Ensuring an admin can confirm delete a user's post (#16485)
Prior to this commit, the admin could delete the post but were blocked
by the "delete confirm".  The blocker was because we scoped the finding
of an article to the current user.

With this commit, the admin should be able to confirm the deletion of an
article.

Closes #16461
2022-02-09 11:28:58 -05:00
Alex
f071903176
Remove counts from instance API (#16479) 2022-02-09 11:07:44 -05:00
ludwiczakpawel
50a4f0422b
Admin's Member view (#16174)
* init

* .

* partials

* few extras

* revert indicators in favor of separate PR

* stuff

* .

* stuff

* whoops

* .

* .

* .

* .

* opacity

* partial

* cosmetics

* move actions to a partial

* whoopsy

* Added an @admin alias for the frontend and removed the @admin-controllers alias.

* Added modal support for admin user actions.

* Added modal support for more parts of the user admin.

* pills

* pills

* pills

* Added optional chaining for when the overview panel isn't loaded.

* styling updates

* fix

* modals

* pass size

* tags

* .

* balance modal

* comment

* fixes

* Improved modal trigger implementation.

* Removed default value for dataset.

* Moved prevent default to after modal trigger check so forms still submit.

* Update app/views/admin/users/widgets/_credits.html.erb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update app/views/admin/users/reports/_index.html.erb

* Apply suggestions from code review

* Apply suggestions from code review

* Update app/views/admin/users/actions/_export.html.erb

* Update app/views/admin/users/widgets/_tag_moderation.html.erb

* Update app/views/admin/users/actions/_merge.html.erb

* Removed <AdminUserActionsModal /> component as it wasn't necessary.

* Fixed duplicate ID errors detected by Axe.

* Redirects to the Show page rather than the Edit page

* Adjusts quotations within _social_accounts.html.erb

* Ensures that Learn More links open in new tab

* updates with latests and greatest

* .

* fixes

* wip. Fixed some issues in the credits form.

* Changed Subtract to Remove for credits dropdown.

* Cleaned up the edits form.

* Wraps functionality in feature flag and calls #set_user_details

* Wraps /admin/users/show.html.erb in feature flag

* wip: Got credit params form working.

* empty select

* responsiveness

* empty commiit

* Updates redirects in spec and controller to show rather than edit

* Updates tag moderation copy in Admin Member Detail View

* Now the note is saved when changing credits.

* Fixed label for attributes as it was affecting writing tests and a11y.

* Removes unused index.js component

* Refactored credit params.

* chore: move method under private and update comment

* verified email responsiveness

* better opacity variables

* better org logo

* indicators

* refactor the credits method

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Nick Taylor <nick@forem.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2022-02-09 14:33:01 +01:00
Daniel Uber
83b35444a6
Remove system test for editing draft posts (#16472)
* Remove system test for editing draft posts

This behavior is checked in the cypress tests in
publishingFlows/publishOrSavePost.spec.js

* Copy original regression test back into cypress check

The system spec was checking that after attempting to save as draft,
when seeing an error, editing and saving as draft was permitted.

Replicate that behavior in the existing cypress test that checks invalid
markdown raises error, specifying that replacing the content and
saving succeeds (and stays in draft status).
2022-02-08 10:24:49 -06:00
Arit Amana
2842bc68d6
Implement Unified Embeds for Github Repo, Issue, Pull-Request and Comment URLs (#16422)
* figuring things out

* working both ways for issues PRs except disc and PRreview

* working on repo urls

* complete implementation and check specs

* resolve Travis failures

* resolving travis failures

* Fix VCR cassette

* fix regexs

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
2022-02-07 16:38:43 -05:00
Arit Amana
63c957b12d
Implement Unified Embeds for StackExchange and StackOverflow URLs (#16415)
* complete implementation and add specs

* improvements

* more robust condition

* update API version; re-record VCR cassettes

* PR review comments
2022-02-07 11:21:11 -05:00
Jeremy Friesen
30a894a6eb
Removing deprecated User methods (#16435)
* Removing deprecated User methods

Related to #15762, #15691, and #15624

* Bump for travis
2022-02-07 10:32:58 -05:00
Jeremy Friesen
446e74ca83
Documenting and addl testing FeatureFlag.enabled? (#16420)
Prior to this commit, we had a single test for `FeatureFlag.enabled?`,
namely that it delegates to `Flipper.enabled?`.  This commit adds some
tests to both verify behavior and communicate to developers the
intentions of the related methods:

- `FeatureFlag.enabled?`
- `FeatureFlag.accessible?`

My hope is the documentation and tests will help address the horrors
mentioned in conversation in #16416:

> I have lived the horrors of having a feature flag accidently
> flipped or incorrectly setup in the first place and half baked
> functionality going live.

Note: I'm not proposing that we test other `Flipper` methods, but
instead to ensure that we're testing and documenting the behavior of
what I believe to be the two primary mechanisms of "putting something
behind a feature flag."

Related to #16406, #16416
2022-02-07 08:53:30 -05:00
Jeremy Friesen
75ae759465
Short-circuiting parsing any articles to update (#16413)
* Short-circuiting parsing any articles to update

Setting a field that is to help track from where we received an image.

Related to #16075 and #16407.

See [Slack Thread][1] for all the details

[1]:https://forem-team.slack.com/archives/CSY5KKK9U/p1643916711077719

* Fix

* Apply suggestions from code review

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
2022-02-04 11:13:01 -05:00
Jeremy Friesen
765df66084
Scoping the :listing routes to feature (#16406)
This commit builds on the conditional rendering of navigation links by
adding a routing constraint to all :listing routes.

The impact is, if we were to disable the listing feature (e.g.,
`FeatureFlag.disable(:listing_feature_enabled)`) all requests to `GET
/listings` (and those drawn in the [config/routes/listings.rb][1] file)
would return a 404 response.

Related to forem/rfcs#291, #16335, #16338, #16362.

Testing this change:

1. Start your local application (e.g. `$ bin/startup`)
2. Go to http://localhost:3000/listings
3. You should get a Successful response.
4. Now disable the feature (e.g. `$ bin/rails r \
   "FeatureFlag.disable(:listing_feature_enabled)"`)
5. Refresh http://localhost:3000/listings
6. You should get an `ActiveRecord::RecordNotFound` error; because the
   application is now looking for a user or org named "listings"; in other
   words we're not routing `GET "/listings"` to `listings#index` controller
   action.
7. Now enable the feature (e.g. `$ bin/rails r \
   "FeatureFlag.enable(:listing_feature_enabled)"`)
8. Refresh http://localhost:3000/listings
9. You should get a Successful response.
10. Goto 4

This commit is intended to be the penultimate change before we toggle
the listings section off by default.

[1]:c2ce2c32d5/config/routes/listing.rb (L1)
2022-02-04 10:13:56 -05:00
Jamie Gaskins
a9cdb2bae2
A suspended user returns 403 instead of 500 (#16408) 2022-02-04 09:42:23 -05:00
Daniel Uber
99307167f7
I18n's short format for times differs from "%b %e", update test (#16414)
This passed in the branch because the last commit was on a two digit
day (so the digit padding wasn't needed or expected, it checked "Jan 30" ==
"Jan 30", but today "Feb 4" != "Feb  4")
2022-02-03 15:49:09 -06:00
yheuhtozr
e45536af37
app/models i18n (#16124)
* app/models etc i18n

* delete ja.yml

* fix for PR review

* fix for spec

* delete ja.yml

* fix for spec updated
2022-02-03 13:41:42 -05:00
yheuhtozr
c4778d832e
app/controllers & decorators i18n (#16126)
* app/controllers (& decorators) i18n etc

* tidy key names

* update keys

* delete ja.yml

* delete an involved ja.yml

* fix for PR review

* fix for spec

* delete ja.yml
2022-02-03 13:35:56 -05:00
Jeremy Friesen
c17fa11875
Bypassing validiation for data script (#16407)
* Bypassing validiation for data script

Prior to this commit, we attempted to run a script against all articles
using validation.  In the case of DEV, we have lots of articles that
would no longer validate.  This change now updates the column value
without running validation.

Relates to #16075

* Bump for travis
2022-02-03 13:29:14 -05:00
Anna Buianova
9a11beec50
Reorganized article published_at/dates specs (#16403) 2022-02-03 19:04:58 +03:00
Michael Kohl
a1eb6358db
Easier feature flag handling for Cypress (#16379)
* Add RailsEnvConstraint for routes

* Add feature flags API

* Add Cypress commands

* Add show action, update commands, add e2e test

* Update cypress/integration/seededFlows/toggleFeatureFlags.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Move helper from command to test file

* Update documentation

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-02-03 10:42:13 -05:00
VISHAL DEEPAK
14a945326d
Add boolean attribute main_image_from_frontmatter to indicate if cove… (#16075)
* Add boolean attribute main_image_from_frontmatter to indicate if cover image was set via frontmatter

* use article model spec for main_image_from_frontmatter test cases

* Add data migration script and spec for main_image_from_frontmatter for articles

* Update app/models/article.rb

Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>

Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-03 09:16:48 -05:00
Suzanne Aitchison
a168f0c85a
Change UI instances of "vomit" to "flag" (#16397)
* change UI instances of vomit to flag

* update spec

* verify tests against i18n string
2022-02-03 12:22:32 +00:00
Anna Buianova
c2ce2c32d5
Improved article date specs (#16395)
* Improved article date specs

* Say rejects
2022-02-03 10:07:42 +03:00