Commit graph

478 commits

Author SHA1 Message Date
Joshua Wehner
00a9db232b
Remove manual user follow suggestions (#19457)
* Remove manually user follow suggestions

* I honestly don't understand what this is doing here

* Remove suggested_users from config spec
2023-05-16 15:01:03 +02:00
Ridhwana
0771a5cd2e
Load post_comments billboard asynchronously (#19285)
* feat: add a route to the async_info for display ads

* feat: load the billboard asyncronously

* feat: move the methods to the display_ads controller

* feat: handle params better

* feat: cache control headers

* feat: test fastly caching headers on display ads

* fix: surrogate key test

* feat: use safe navigation operator to handle cases where there is no article id

* fix: article id present then find the article

* feat: add a response test

* Fragment caching

* feat: update the article decorator

* feat: update cache keys for fragment

* feat: remove an empty line

* feat: add article id

* feat: bust cache

* feat: setup dropdown for billboard

* chore: add chunk to same line

* feat: add to safe params for caching

* Update app/controllers/display_ads_controller.rb

Co-authored-by: Joshua Wehner <joshua@forem.com>

* feat: remove the cache deletion

* feat: update the routes to follow a new scope

* feat: update the cache params

---------

Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-04-12 18:15:15 +02:00
Rajat Talesra
fc28dfaae5
Support for new ad placement locations on home page feed (#19299)
* Basic implementation of all 3 ad placements

* UI fixes

* Dropdown bug fix

* Optimised code

* Updated tests

* Updated tes

* EOF added

* Improved a11y

* Nit fix
2023-04-12 18:47:29 +05:30
Joshua Wehner
a20cf3e02b
Unique cross-model-slug check is likely misconfigured (#19263)
* Page unique_cross_model_slug seems misconfigured

* Update validator test

* More verbose invalid attribute message

* Try dynamic model/attribute registration

* Rubocop

* Use the cross-model-slug existence check

* Register with the dynamic cross-model-slug checker

* Cleanup

* Add missing keys to fr

* Update format regex

* Adjust validation: always presence, unique if changed

* Tests can create reserved-word pages when they need to

* Slugs can be mixed case?

* Case-sensitive is better, actually

* Refactor to use CrossModel check

* Refactor, rename for clarity

* Refactor, avoid mocking oneself

* Refactor, injectable everything

* Add reservedword check to extracted exists? checker

* Move to concerns

* Without dynamic registration

* extend when needed

* Cleanup comments, remove registration references

---------

Co-authored-by: Goran <gorang.pub@gmail.com>
2023-04-07 17:04:45 +02:00
Mac Siri
842e6880b8
Routine rubocop fix on /spec (#19217)
* Softrun rubocop

* Hardrun rubocop (-A)

* Change a rubocop rule

* Add missing cops

* Undo & redo rubocop -A
2023-03-21 09:55:26 -04:00
Mac Siri
627cb203f6
Address flaky specs (#19188) 2023-03-02 09:40:06 -05:00
dancristianb
814080dc3b
Fix nested sidebar active item highlight (#18973)
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Fernando Valverde <fernando@fdo.cr>
Co-authored-by: Joshua Wehner <joshua@forem.com>
2023-02-21 16:18:42 -05:00
Mac Siri
c3e3574e09
Fix flaky runkit spec (#19131) 2023-02-17 10:51:17 -05:00
Joshua Wehner
1374ab98e6
Ensure spam doesn't hit logged-out /latest (#19110)
* Ensure spam doesn't hit logged-out /latest

* Restore load-bearing constant

* Narrow selector avoids the new 'latest' banner

* Test scenario for signed-in low-score content

* Remove false-negative test

* Actual test for the logged-in scenario

* Signed-in users get poor quality content

* Feeds (RSS) use an entirely different query

* Pass @stories

* Update tests with new minimum score
2023-02-17 09:29:59 +01:00
Rajat Talesra
26c72096ba
Remove bootstrap classes : collapse hide show (#18917)
* Removed bootstrap from listing_categories, listings, navigation_links

* Removed not-used bootstrap classes from admin/tags

* Removed bootstrap from admin/settings

* Fix collapse glitch in profile-fields

* Feedback partial progress

* Feedback partial progress

* Removed form-control

* Replaced card with crayons-card

* Fixed profile field UI

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Removed collapse hide and show classes

* Nit height fix

* Nit width fix

* Updated tests
2023-01-06 21:25:49 +05:30
Ridhwana
6cb97eeb01
Async Hamburger Menu Implementation + Caching Optimizations (#18818) 2022-12-20 20:00:08 +02:00
Rajat Talesra
888c6b93bf
Organisation profile page redesign (#18717)
* Partial redesign org page

* Removed div

* Team members design fixed

* Nit fixes

* Nit fixes

* Nit fixes
2022-11-21 21:33:44 +05:30
Rajat Talesra
b6d90a65b4
Replace comments box on non-signed-in User profile page with signup CTA #18608 (#18635)
* Basic implementation of CTA in place of Recent Comments

* Updated & Added Tests

* Nit fix

* Test fixes

* I18n strings

* Changed UI in main feed too

* Fixed tests

* Nit fix

* Initialised tracking
2022-11-05 02:27:06 +05:30
Rajat Talesra
768eb219ef
Redesigned home feed auth CTA (#18681)
* Redesigned home auth CTA

* Nit fixes

* Nit fixes

* Updated test

* Applied review changes

* Applied review changes

* Refractored login path code

* Added aria-label
2022-11-04 20:58:03 +05:30
Joshua Wehner
201f4d998a
Try hiding low-quality comments (#18513)
* Try hiding low-quality comments

* Message indicating when negative comments are being hidden

* Adjust comment show count for logged-out visitors

* Remove unusued comments_to_show_count from article decorator

* Remove unusued comments_to_show_count from podcast episode decorator

* Add test for hidden negative comment

* Update spec/system/articles/user_visits_an_article_spec.rb

Co-authored-by: Fernando Valverde <fernando@fdo.cr>

* Don't create twice; do test logged-in and -out

* Comment caching needs to account for signed-in status

Co-authored-by: Fernando Valverde <fernando@fdo.cr>
2022-10-11 14:15:40 +02:00
Fernando Valverde
e5e36a2e2d
Comment fragment link when signed out (#18517)
* Comment fragment link when signed out

* Optional chaining for article path

* Fix comment liquid tag rendering

* Extract signed in/out logic into helper

* Debugging specs

* Fix specs

* Use named empty anchor to link comments with id_code
2022-10-03 07:58:34 -06:00
Ridhwana
9dee48dbc2
Add tracking for the registration flow - "Clicked on Create Account" (#18459)
* refactor: move trackEvents to a utilities folder so that it can be re-used

* feat: add a function called trackCommentClicks and use it on the articlePage

* feat: update the auth widget to take the correct properties

* feat: add create account tracking method for hamburger

* feat: add create account tracking method for sidebar left

* feat: whoops, sidebar tracking info added

* feat: add the feed card create account tracking

* feat: whoops add the id to the dom

* feat: add top nav create account tracking

* feat: create account tracking for the registration modal

* fix: callback instead of invoking + rename class

* fix: js-prepend

* feat: some showLogin event tracking

* use the tracking propert

* x - feed.jsx

* fix: oops I removed hidden

* track from the search login

* feat: add tracking for follow button

* fix: main_stories is only being called in view/articles and both are including the FollowButtons pack

* comments track

* feat: remove punc (.)

* chore: cahnge working

* chore: remove tracking-id from modal

* feat: remove ecmascript features

* refactor: rename some events

* feat: referrer page

* feat: add a secondary source for the follow buttons

* feat: remove file that is not used

* chore: rename key

* feat: use @utilities

* feat: add spec for create account clicks

* feat: add key referrer

* fix: tests

* fix: oops

* chore: add commented test

* test for tracking

* feat: update the change by 1

* feat: aggregate_failures

* feat: add data-no-instant back

* feat: try a different way of testing

* refactor: change secondary_source to referring_souce

* feat: change ahoy event test

* feat: add a version number to ahoy tracking

* feat: change the href to pathname

* feat: reply comment tracking

* fix: to be present syntax

* feat: use href instead of pathname

* chore: do not track tags and podcasts follow and remove referrer

* feat: add readinglist

* fix: remove referrer from test

* feat: fail gracefully in instances where there is no tracking data
2022-09-22 16:03:49 +02:00
Mac Siri
41987116c7
Replace webdriver with cuprite (#18476)
* Replace webdriver with cuprite

* Fix broken spec

* Fix broken spec

* Fix broken spec

* Fix broken spec
2022-09-22 08:23:42 -04:00
Anna Buianova
455399bdba
Rubocop fixes (#18461)
* Rubocop fixes

* Fixed most Capybara/SpecificMatcher violations

* Moved flash notice texts to locales
2022-09-16 15:25:48 +03:00
Rajat Talesra
5559067e34
Revert "Revert "Entire profile badge redesign" & "Badges page redesign" (#18446)" (#18447)
This reverts commit d7f70eb85b.
2022-09-13 22:06:37 +05:30
Rajat Talesra
d7f70eb85b
Revert "Entire profile badge redesign" & "Badges page redesign" (#18446)
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2022-09-13 11:39:46 -04:00
Rajat Talesra
f1176900f0
Badges page redesign (#18419)
* Badges homepage redesign

* badges.scss

* Attempt at solving badge ci check

* Added badge prompt

* Merged with main

* Removed /badge/.. related code

* Revert removing badge page

* Fixed Safari design issue

* Removed not-requried css property

* Trying to remove /badge/

* Updated profile badges

* Fixed userprofile badge

* Accessibility changes + removed failed tests

* Tests passed
2022-09-13 03:07:59 +05:30
thejwuscript
fea90d2e84
Fix inconsistent published date of Article and Comment (#18412)
* Revise system specs for viewing a comment

* Add system specs for viewing comment date

* Add conditional to SetTimeZone middleware

* Revise comment_date partial

* Refactor viewing a comment system specs

* Add more system specs for viewing a comment

* Fix format of comment date with short year

* Fix edited comment date

* Fix comment date when posting new comments
2022-09-09 14:12:15 -06:00
Anna Buianova
a4ffb7cac3
Allow published_at to be within 15 minutes, not 15 hours (#18345)
* Allow published_at to be within 15 minutes, not 15 hours

* Fixed creating past articles in the specs

* Fixed one more spec with a past article

* Use ActiveSupport's helper instead of computation

Co-authored-by: Fernando Valverde <fernando@fdo.cr>

Co-authored-by: Fernando Valverde <fernando@fdo.cr>
2022-08-22 12:48:40 +03:00
Anna Buianova
cab9b754b9
Don't show manage link in the action-space for a scheduled article (#18278)
* Don't show manage link in the action-space for a scheduled article

* Fixed Article#scheduled? for articles with empty published_at
2022-08-08 15:14:11 +03:00
Suzanne Aitchison
f1df37f431
Add "only display when logged out" as an option on Navigation Links (#18275)
* add new column with enum value

* refactor to use display_to column

* add some more specs to application_helper

* test for the backfill DUS

* fix line length

* refactor
2022-08-08 10:55:24 +01:00
thejwuscript
9bc0d83130
Fix reply button visibility on locked discussion (#18023)
* Add specs for unlocked discussion

* Add specs for locked discussion

* Edit wording for discussion lock specs

* Set instance variable on CommentsController

* Fix legacy comments index view

* Empty commit - Trigger CI

* Modify test assertions

* Add data-testid attribute to reply button

* Add cypress custom command createComment

* Add cypress specs for locked discussion

* Add cypress specs for unlocked discussion

Co-authored-by: Fernando Valverde <fernando@fdo.cr>
2022-07-27 09:29:55 +01:00
Anna Buianova
80ce8909ec
Fixed most rubocop issues (#18048)
* Fixed most rubocop issues

* Fixed accidental schema changes

* Fixed Vault specs
2022-07-07 14:36:08 -06:00
Anna Buianova
ff76cdd3c5
Scheduling articles (#17939)
* Article query spec for scheduled articles

* Added scheduled article badge on the user dashboard

* Added published_at field to editor options

* Accept and validate published_at from editor

* Refactor published_at validation

* Allow 1-minute difference in published_at

* Notice on an unpublished article page

* Added specs for 'Click to edit' link on scheduled article preview page

* ContextNotification model

* Articles::Publish worker

* Added specs for articles publish worker

* Schedule publish articles worker

* Added tests to check for scheduled posts in feeds

* Don't allow managing scheduled articles

* Don't send notifications for scheduled articles

* Set published_at in Articles::Updater when publishing

* Published_at value in post options

* Pass timezone and set published_at accordingly

* Limit setting published_at to the future

* Readonly published_at for articles that were already published

* Chagning published_at format in editor v1 (start)

* Changed published_at format in frontmatter, specs

* Added specs for updating published_at from frontmatter

* Fixed accepting past published_at for articles published_from_feed

* Enabled published_at validation: don't allow updating published_at for already published articles

* Validate published_at on create

* Added a spec for updating published_at for exported articles

* Fixed specs related to creating articles with past published_at

* Fixed specs related to past published_at for articles

* Added a hack so that admins would be able to update published_at

* Switch button text schedule/publish when changin publishedAt

* Fixed saving published_at with timezone

* Added a feature flag for scheduling articles

* Default text in markdown editor depends on feature flag

* Enable article editor cache again

* Fixed the default value in the markdown editor

* Fix sitemaps spec

* Removed tooltip

* Fixed articles update specs

* Added missing locales

* Fixed article create specs

* Fixed spec

* Removed commented code

* Returned enabling extensions in the schema

* Returned accidentally deleted constraint

* Make articles query spec more stable

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

* Removed commented code

* Removed unused code

* A clearer policy

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

* Use StringInquirer for article current state

* Added a note and todo to articles factory past trait

* Remove duplicated PropType

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

* Refactor query in the Articles::PublishWorker

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

* Refactor articleForm.jsx

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

* Removed specs that are no longer relevant

* Removed useless onKeyUp on a hidden input

* Refactored articleForm

* Hide scheduling from post options when published_at is readonly

* Run sends notifications worker every 5 minutes instead of every minute

Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2022-07-07 17:32:49 +03:00
Mac Siri
678dda8cf4
Routine Rubopcop lint fixes (#17844)
* Routine Rubopcop lint fixes

* Undo app_secrets_spec changes

* Fix broken spec
2022-06-07 10:17:16 -04:00
Suzanne Aitchison
c119b64b74
Reusable user admin modals (#17763)
* target modal content by a classname to avoid duplicate IDs

* woops - fix missed selector

* use showWindowModal in editUser

* move add org to a partial

* move add role into a partial

* move adjust credits to a partial

* move profile modals to be re-used

* generalise approach to add organisation modal

* generalise add role modal form

* generalise adjust credits modal

* rework unpublish modal

* refactor banish user modal

* refactors

* prevent issues with duplicate ids

* fix banish form action

* make sure role management specs covered in cypress

* let hidden modal content use IDs

* rename file for clarity

* add some JSDoc notes

* cleanup some redundant changes

* one more

* woops - fixed id that contained a classname
2022-06-02 09:52:26 -06:00
Jeremy Friesen
ca7228084a
Ensuring we don't render call to action when unauthorized (#17640)
Prior to this commit, if the Forem limitted article creation only to
admins, when a new user would sign-up their call to action was to
"Create a Post".  If that new user clicked on the button, they would get
an action unauthorized error.

With this commit, the call to action for Creating a Post is hidden to
that user.

The `users/onboardings/_task_card.html.erb` is rendered as part of the
home page.  The home page, due to our [EdgeCacheSafetyCheck][1], does not
allow us to access attributes of the current user (e.g. are they an
admin); which means we can't add a `if policy(Article).create` to the
HTML erb.  We must instead use the [`application_policy_content_tag`][2]
as well as the [AsyncInfo][3] to help inform the
[applyApplicationPolicyToggles.js pack][4] of the conditional rendering.

Closes forem/forem#17638
Related to forem/forem-internal-eng#347

[1]:8160089f3d/app/controllers/concerns/edge_cache_safety_check.rb
[2]:8160089f3d/app/helpers/application_helper.rb (L390)
[3]:8160089f3d/app/models/async_info.rb (L52-L61)
[4]:8160089f3d/app/javascript/packs/applyApplicationPolicyToggles.js
2022-05-11 15:26:24 -04:00
Arit Amana
629b898853
Improve Dashboard specs coverage (#17550)
* still building

* complete specs

* cover listings count

* consolidate specs to save time
2022-05-04 10:38:40 -04:00
Suzanne Aitchison
25bf8a0711
Remove name from invitation flow (#17438)
* remove name from invite user flow

* remove name from invitation instructions

* update invitations spec

* update specs and invitation actions overflow menu name

* allow users to set name when accepting invite
2022-05-03 09:33:12 +01:00
Arit Amana
4b04d06adf
Show Series counts on all Dashboard Tabs (#17513)
* implementation and tests

* refactor specs
2022-04-29 11:58:06 -04:00
Suzanne Aitchison
ece0cbbba8
remove redundant feat flag (#17405) 2022-04-22 16:14:16 +01:00
Julien Maury
01c1d44e65
Fix duplicate IDs on homepage (#17092)
* fix duplicate ID main nav

* fix duplicate ID other nav headings

* fix duplicate ID reading list count

* fix duplicate attribute class

* missing case readingCountList on feed

* missing dot in query selector

* Revert "fix duplicate ID other nav headings"

This reverts commit 4f495962c47e08f0f6c41e33e897b2db176432f5.

* use generic class 'other-nav' for tests

* pass a variable 'context' to the partial nav

* pass var 'context' to partial

* fix unwanted typo in partial sidebar

* Update app/views/admin/navigation_links/index.html.erb

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

* Update app/assets/javascripts/initializers/initializeReadingListIcons.js

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

* Update app/assets/javascripts/initializers/initializeReadingListIcons.js

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

* js-reading-list-count renaming

* use data-testid instead of generic classes for tests

* fix typo in specs

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-04-14 10:48:55 +01:00
Arit Amana
240893401d
Show a "Unable to login" message in browser when a user is unable to login. (#17261)
* implementation and modify spec

* oops! correct unwanted change

* nudge Travis

* nudge Travis
2022-04-13 09:00:56 -04:00
Daniel Uber
44ab69ae4e
Wait for js component to mount before editing (#17239)
This test had been failing with "title can't be blank" a few times
recently. Looking for a difference between the v2 form template (in
app/views/articles) and the ArticleForm component (in
app/javascript/article-form/) showed there is an id on the js form but
not the erb/html form we respond with first.

The test had been sometimes typing the title into the text area before
the component mounts, and trying to view the article gives a
validation error rather than the expected response.
2022-04-11 22:24:13 -05:00
Daniel Uber
2ddefcbba5
Remove guard clauses and update expectations (#17138) 2022-04-08 15:20:19 -05:00
Suzanne Aitchison
be64f43c1a
Refactor runtime to webpacker JS (#17142)
* add runtime utilities in webpack land, refactor webpack JS using old class

* access Runtime in legacy JS code via window.Forem namespace

* refactor

* make sure data-runtime added only after page does initial load
2022-04-07 15:39:38 +01:00
Daniel Uber
1a07ad8d9e
Profile attribute names should be unique and non-empty (#16396)
* transliterate when generating attribute names to avoid emptiness

If you enter a non-ascii (non `\w` matching) string as the profile
field label, the attribute name is the empty string.

This causes problems outlined in #16391

To avoid losing user provided data, transliterate (Sterile is the same
tool we're using for Article#title_to_slug) before matching against
the word regex.

If we persist an empty string, or persist a non-`\w` name, the
coordinating regex in Profile::ATTRIBUTE_NAME_REGEX will leave a nil
match and raise NoMethodError (the method missing is for
match[:attribute_name] when match was nil, not Profile - that's the
next commit.

* Guard against nil matches

If an attribute name doesn't match the regex, the match is nil, and
trying to access (nil)[:attribute_name] raises a NoMethodError.

If there was no match, assume profile does not respond to the
selector, and don't handle it in method missing.

* Ensure generated attribute name is valid before saving

This raises a validation error if the generated name (from the label)
would be empty.

It's not an optimal error message (since the user can't see the
internal attribute name) but it prevents persisting broken/empty data

* actually raise error when validating

validate/valid? only return true or false (and set errors on the
object). In order to reject the creation, we need to raise a
validation error, not only call validate. I think this is because the
execution of before_create hooks happens after validation (which is
why the validation was only checked on update, not create).

* Generate an attribute name completely independent of the field label

This prevents mistakenly labeling a field "Class" or "Association" or
one of the other hundred public methods an AR model like Profile
exposes. Since attribute_name will be passed to `profile.public_send`
we really shouldn't build selectors from user supplied inputs.

* Use the admin supplied label in the sidebar

The profile decorator is used in the Users#show page to populate the
sidebar fields. Don't use the attribute name (which we mangled during
creation, and now generate randomly) as the label, use the label.

* Make the label lookup null safe, and filter attributes more

* Update data update script to not expect predictable labels

This is low impact since it ran in july, but we no longer know what
attribute name a label will create.

* Fix moderator spec

"Test Field" label no longer predictably generates :test_field as an
attribute name. Ask the field what it's name is before asking profile
about it.

* Fix profile preview card request spec

Remove the assumption that profile responds to a method name based on
the label for Work and Education fields.

* Update old DUS and its test

This can probably be archived

* Update profile spec to use fields generated attribute names

We used to "know" how attributes were generated from labels. Now we don't.

* update e2e seeds for profile field change

* Don't expect attribute name to be based on the label

* expect created profile fields respond to their attribute name

* Update system test

The label, not the attribute name, is shown on the profile form (the
field has an id related to the attribute name, but the view shows the
mutable/human-readable label).

* Keep the field title lowercase when sending the json preview card

The userMetadata component expects "work" and "education" to be
attributes of the metadata, but the ui_attributes_for() method was
titlizing these (for display).

Ideally we wouldn't have "special purposed" these two field names, but
they're there.

* update profile field by attribute name, not based on label

* Update profile field removal assumptions

We don't know what the method selectors will be, we have to ask.

* remove old test

* Update translations for Education and Work

Since the ui_attributes_for(area:) now gives the label, not the
attribute, we need to match the label of the profile field.

Note to self: this exposes an issue in localizing the custom profile
fields (probably a bigger problem for large, international communities
like DEV than some others, but trying to match static translation
files against user-modifiable database records seems like a problem
we'll see again).

* Empty commit to retrigger buildkite

* Remove profile field migration update scripts

Cloned the specs from the other "remove unused scripts" script.

* Remove unused scripts

The data update script removes the entry from the table (recording
that these have run) - we also want to remove the files (preventing
them from running again).

* remove unneeded spec for removed file

* when translation for header area field not found, use the title

Only Work and Education already have keys in the yml translation file,
and there's not a great (or easy?) way to make multiple translations
on these fields right now.

Since an admin can create a new field, and assign it to the header
area, we can't assume the code has a configured translation key for
this field.

Fallback to the title (we do this in another context already) if
there's no translation.

* PR feedback: Avoid n+1 query for labels

the original implementation of "label_for_attribute" had an n+1 query
looping over each matched key.

Follow suggested improvement and pull labels and attributes at once
from the db and modify the returned hash.

* Downcase title before looking for translation key

This avoids putting "odd" capitalized keys into the yml translation
file

Revert addition of "Work" and "Education" to the users files.

* use a let binding for duplicated test data

* Update app/models/profile_field.rb

prefer SecureRandom.hex for a dashless uuid (instead of removing the dashes).

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

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
2022-04-04 12:14:02 -05:00
Anna Buianova
b14e5522cd
Fixed hiding 'Click to edit' link for drafts (#17051)
* Fixed hiding 'Click to edit' link for drafts

* Improve "click to edit" link spec

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

* Make the expectation more clear

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

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2022-03-30 22:29:36 +03:00
ludwiczakpawel
0bf6839a81
Admin analytics (#16528) 2022-03-28 21:51:51 +02:00
Andy Zhao
5fab2f86b0
Always show the browse section of podcasts regardless of featured (#16329)
* Always show the browse section regardless of featured

* Add tests for /pod

* Use safe operator if there are no episodes to show

* Fix test for new podcast page

* Fix test again for podcast page
2022-03-22 12:56:54 -04:00
Takuya N
26e10fc71e
Use the canonical URLs to link from sorted pages (#16928)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-03-22 14:51:36 +00:00
ludwiczakpawel
2cec22e146
Removing bootstrap from Config's collapsable sections (#16620)
* .

* updates

* update specs

* expand profile field before deleting

* expand auth section in rspec test

* expand smtp settings summary in rspec

* update user experience section specs

* more spec tweaks

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-03-22 14:57:07 +01:00
Julianna Tetreault
aa44786ebd
Remove admin_member_view Feature Flag-Related Conditionals (#16764)
* Removes admin_member_view feature flags and refactors  conditionals

* Removes unused admin/users/_email_tools partial and user_email_tools_spec

* Actually remove the admin/user_email_tools_spec this time

* Removes the edit route from admin.rb users

* Adds a DUS (and spec) to disable and remove admin_member_view flag

* Fixes admin/users_spec.rb failures by updating spec with Member Detail changes

* Fixes spec failures within admin_bans_or_warns_user_spec.rb

* Refactors Admin::UsersController#credit_params due to failing specs

* Removes last traces of edit_admin_user_path and fixes buttons, specs, etc.
2022-03-10 08:29:05 -07:00
Mac Siri
9be5c8c6b0
Routine Rubocop fixes (#16838) 2022-03-09 09:32:50 -05:00
Daniel Uber
1bf350c321
Fix broken email settings documentation link (#16792)
* Fix broken documentation link

When sending an invitation, and smtp isn't configured, we show a link
to the old smtp-settings page, which has been renamed
email-server-settings in the admin documentation site.

* Remove explicit link target, assert link text is present

This spec failed when I changed the link target to match the
documentation. Rather than moving the target, I'm just asserting we
show a link to the docs (not where the docs are located).
2022-03-07 10:45:35 -06:00