Commit graph

28 commits

Author SHA1 Message Date
Mac Siri
20faec4899
Support chromedriver in container (#20224) 2023-10-16 15:12:53 -04: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
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
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
Julianna Tetreault
45b7806120
Remove Remaining logo_svg Code (#16291)
* Removes logo_svg-related code

* Removes logo_svg-related specs

* Removes the logo_uploader and logo_uploader DUS spec

* Removes the logo_uploader_spec.rb

* Adds a DUS to remove the logo_svg var from the DB

* Reverts the removal of the logo_svg_uploader.rb
2022-02-22 12:05:16 -07:00
ludwiczakpawel
096cf18b10
Article layout (#14753)
* style updates

* author and tools

* overflow hidden for avatars because geeeez

* font smoothing

* reverting little change

* specs

* preview

* css fix

* avatar fix'

* No longer eager load user profile when showing articles.

articles show view no longer needs user profile, as it no longer
renders the user profile preview.

* tags

* tags

* tags reverts

* typo

* dropping initializer for user cards previews on article page

* spec

* remove spec

* revert

* Update app/decorators/article_decorator.rb

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

* Update spec/requests/stories_show_spec.rb

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

* yoloing outline change on buttons because i couldn't see any visual difference

Co-authored-by: Dan Uber <dan@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
2021-09-30 19:08:06 +02:00
Mac Siri
94d2261d42
Remove #sanitize_and_decode (#14727) 2021-09-15 11:05:06 -04:00
Molly Struve
e87dead7ad
Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121)
* schema file undelete description

* feat: v1 of the script

* Flesh out remaining enums under their categories

* complete UsersSettings data update script

* complete DUS for relevant attributes in users and profiles tables

* complete DUS for users_notification_settings

* alphabetize user_settings sql file

* safeguard against null values for "null: false" settings

* Set up actual UsersSettings DUS and specs files

* fix broken DUS script

* complete specs for UsersSetting DUS

* Address QA of specs

* complete specs for users_notification_settings DUS

* fix the typos (thanks Julianna!)

* begin implementation

* still building

* add missing attribute "email_membership_newsletter"

* complete sync code (except race condition for user profile)

* complete implementation, remains tests

* Address PR review and fix Travis fails

* remove superfluous Profile.new

* fix travis fails

* feat: update the users_notification_setting attributes from the user model

* feat: use the config fonts enums to display the fonts

* feat: loop through the keys

* fix profile = nil blowing up; add specs for notification_setting model

* remove unneeded spec

* remove feed validation until after sync code removed; fixes feed_import spec failures

* remove spec associated with feed_url validation in user_setting model

* fix failing spec 😅

* add TODO

* feat: set the user settings in the user controller  and use it in the customization form

* feat: move some update logic to the users settings controller thats being used from customization

* feat: show the updated values form the users_settingd and not the user instance

* Generalize redirect back to current tab

* still trying to reflect changed theme upon refresh

* customizations take effect on refresh

* remove 'with_feed' scope from user model

Co-authored-by: Jamie Gaskins <jamie@forem.com>

* start with takeover for fields previously in profiles table

* Takeover code for `publishing_from_rss` section in Settings (#13914)

* implement takeover code part 1

* implement takeover code

* fix feed fetch

* need rhymes help

* complete implementation; specs pending

* fix STUPID omission that caused so many headaches 😫

* implement profile fields pointing to users_settings 🎉

* run migrations

* implement inbox type & guidelines takeover code; specs pending (#13911)

* Point changes in notification settings to `users_notification_settings` table (#13910)

* implement takeover code; remains specs

* address PR feedback; remove related sync code

* address PR review feedback

* need help with routing and specs

* address pr review

* addressing pr review

* Treat implementation edge cases and omissions 😅

* fix uncommented comment

* fixing implementation cases

* address more PR review feedback

* fixing notifications use-cases

* refactor settings controller

* more pr review changes

* solving bugs

* fix broken onboarding

* handle eperience_level calls

* more fixes

* remove unneeded mappings

* add To-dos for quety updates

* remove done TODO

* purge done TODOs

* update notification_settings-related queries

* start fixing specs

* fixing specs

* fix notification and lrg_forem specs

* fixing broken specs

* still fixing

* fix line dif and remove reloads from user.rb

* run specs

* silence bullet and other fixes

* remove setting migration scripts and specs, fix more settings for specs

* handle missing user for article builder and fix notification specs

* fix some final controller specs and re-add incorrectly removed specs

* remove deprecated data update scripts and related workers, put travis back

* refactor admin tags mods controller, write/move specs for users notifications settings controller

* schema cleanup and other small refactors for consistency

* set field we can invalidate in spec via active record instead of at the db level

* remove I think an uneccessary hook call from subscribe_to_mailchimp_newsletter

* use bnefore_create to setup settings, please dont blow up the test suite

* mailchimp bot fix

* remove decorator in favor of single model method

Co-authored-by: Arit Amana <msarit@gmail.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
Co-authored-by: Arit Amana <32520970+msarit@users.noreply.github.com>
Co-authored-by: Jamie Gaskins <jamie@forem.com>
2021-07-08 09:31:34 -05:00
Mac Siri
ffe31cd5aa
Change default value for editor version (#14063)
* Create migration

* Remove explicit "v2" usages

* Fix broken spec

* Update spec/system/user_uses_the_editor_spec.rb

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

Co-authored-by: Jamie Gaskins <jgaskins@hey.com>
2021-06-28 14:08:14 -04:00
rhymes
a798bd2f7d
[15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767)
* Fallback to the image URL if neither Cloudinary nor Imgproxy are configured

* Fix specs

* Cloudinary api_secret is required

* Update spec/models/message_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-05-19 15:03:20 +02:00
Alex
393ba00221
Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606)
* Attempt number 1

* Fix rack_attack specs

* Fix users_searches_users spec

* Fix display_users_search_spec

* Fix comment typo

* Remove search:destroy task from cypress

* Remove port 9300 from gitpod

* Stub response in attack_spec
2021-05-03 11:09:45 -04:00
Vaidehi Joshi
3f6600541e
✂️ Remove the approvals gem ✂️ (#12978)
* Remove approvals fixtures

* Remove approvals initializer

* Remove approvals gem

* Remove approvals step from travis.yml

* Remove approvals from dockerignore and gitignore

* Remove references to approvals gem in docs

* Un-approvals spec/liquid_tags/codepen_tag_spec.rb

* Un-approvals spec/liquid_tags/dotnet_fiddle_tag_spec.rb

* Temporarily skip other approvals tests

We will still need to delete files in /spec/fixtures/approvals after this.

* Revert changes to dotnet_fiddle_tag_spec and codepen_tag_spec, skip those tests instead

* Temporarily skip more approvals based tests

* Attempt at moving html doc inline

* Comment out one more approvals spec

* Update dotnet fiddle and codepen liquid tag specs to not use Approvals

* Update liquid tag specs + system specs to not use Approvals

* Un-approval feed import, github issue, and tweet tag specs

* Re-add .approvals to gitignore and dockerignore

* Use Rspec compound expectations
2021-03-19 13:28:06 -07:00
ludwiczakpawel
69f7f4ba08
Logo on /new (#11701)
* tooltips 1.0.1

* tooltips 1.0.1

* logo on /new

* comment

* spec: Adds a test to ensure that the logo or Community name shows on /new

Co-authored-by: Julianna Tetreault <juliannatetreault@gmail.com>
2020-12-03 08:55:40 +01:00
Molly Struve
b9598ad7d5
Flaky Spec Fix:Ensure We Fill In Article Content Successfully with More Targeted tag (#10330) 2020-09-14 14:28:51 -05:00
rhymes
88f0a0e58a
Rubocop: re-activate Style/RegexpLiteral and fix violations (#9418)
* Rubocop: re-activate Style/RegexpLiteral and fix violations

* Add 10 seconds default timeout to DB statements
2020-07-22 16:28:27 +02:00
Vaidehi Joshi
d2ef01ecc2
Remove Percy (#8915)
We are no longer using the Percy service, so this code is not required anymore.
Removes the percy agent, the gem, and all references to Percy.snapshot and percy: true.
2020-06-25 11:19:58 -07:00
Molly Struve
3f12b62910
Spec Cleanup: Stub Elasticsearch for js: true Specs that Dont Need it (#8453) 2020-06-12 15:43:59 -05:00
Molly Struve
232c67dd0a
Spec Speedup: Comment Out More Percy Only Specs (#8348) 2020-06-08 12:53:16 -05:00
Molly Struve
77543ff87d
[deploy] Spec Speed Up: Comment Out Percy Only Specs (#8347) 2020-06-08 10:54:39 -05:00
Mac Siri
1b839d9328
[deploy] Streamline Tag parsing for both editors (#8175) 2020-06-05 08:46:24 -04:00
Ben Halpern
064dd26df4
[deploy] Change text in failing PUBLISH test (#8162) 2020-05-29 13:48:30 -04:00
ludwiczakpawel
a161d3ce31
[deploy] Redesign article editor (#7524) 2020-05-29 11:59:37 -04:00
Mac Siri
25c1f9210f
Remove redundant include of CloudinaryHelper (#8136) 2020-05-29 10:26:46 -04:00
Vaidehi Joshi
b1de4cb1cf
Add Percy 🦔 (#7783) [deploy]
* Add Percy to Gemfile, rails helper

* Percy snapshots for using the editor

* Add PERCY_TOKEN to sample_application.yml

* Percy snapshots for visiting the homepage

* Percy snapshots for viewing an article's comments

* Percy snapshots for creating an article

* Percy snapshots for editing an article

* Percy snapshots for logged in/out user

* Remove empty spec file

* Percy snapshots for settings page

* Percy snapshots for reading list

* Percy snapshots for admin view

* Percy snapshots for moderator view

* Percy snapshots for authentication views

* Percy snapshots for article and tag views

* Percy snapshots for editing/deleting comment views

* Percy snapshots for admin views

* Percy snapshots for comment views

* Percy snapshots for organization views

* Percy snapshots for pro membership views

* Percy snapshots for podcast views

* Percy snapshots for user views

* Percy snapshots for dashboard views

* Percy snapshots for homepage views

* Percy snapshots for video views

* Add js: true in tests that require it for Percy

* Percy dependency cleanup

* Add the Percy agent
* Remove the PERCY_TOKEN from sample_application.yml
* Move the Percy gem into the "test" group in the Gemfile

* Remove duplicate snapshots, provide unique names to snapshots

* Set seed on Faker::Config for deterministic Percy snapshots

* Freeze time in js: true tests for determinstic snapshots

* Upgrade Percy to v0.26.3

* Add percy: true flag for Percy snapshotting tests

* Add more percy: true flags
2020-05-18 11:35:53 -07:00
rhymes
decae056f1
Routine rubocop fixes (#7885) 2020-05-18 10:27:51 +02:00
Mac Siri
6d1638ed68 Unskip all skipped specs (#2941)
* Change all login_as to sign_in

* Unskip comment spec

* Create new specs

* Turn on Webdriver caching

* Set logger for Omniauth in test

* Update editor system spec

* Fix editor approval file

* Update video_controller

* Update TagAdjustmentUpdateService's spec

* Update users api spec

* Update stories_index_spec

* Remove redundant spec file

* Remove residual code

* Change ClassifiedListing spec

* Update NotificationsIndex spec
2019-05-25 11:04:38 -04:00
Ben Halpern
c7d7d55460
[WIP] Move both v1 and v2 editor to v2 preact-driven editor (#2797)
* Initial work on v2

* Initial changes merger

* Work to finalize v1/v2 editor adjustments

* Clean up styling

* Fiddle with form margins

* Fix some tests

* Change video

* skip a couple tests

* Modify tests to work with new code
2019-05-13 12:27:36 -04:00
Mac Siri
fc39f24ee3 Migrate feature test to system test (#2301)
* Move all features to system

* Remove database_cleaner & apply use_transactional_fixtures

* Move rspec-retry to :test

* Update Capybara config

* Update rails_helper

* Fix user_visits_a_comments_page_spec.rb

* Fix lint
2019-04-04 12:15:10 -04:00
Renamed from spec/features/user_uses_the_editor_spec.rb (Browse further)