-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continuous Release 1.15.0 #723
Open
Splines
wants to merge
30
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add missing case that Term.active is nil * Add unit tests for lecture#stale? * Make lecture#older_than? method private * Add cypress test for lecture edit page * Make better use of .then() Co-authored-by: Splines <[email protected]> * Add docstring * Remove obsolete line * Rename for consistency * Add missing punctuation to docstring --------- Co-authored-by: Splines <[email protected]> Co-authored-by: Splines <[email protected]>
* Pin versions for GitHub repos * Replace >= with ~> and current version * Group gems according to name & clean up comments * Remove SQLite dependency We've been using PostgreSQL instead for a long time. * Pin all dependencies to allow only automatic minor updates
* Initialize voucher model and add some unit tests * Make ensure_no_other_active_voucher validation into a callback * Add throw :abort in order to halt execution * Replace Time.now by Time.zone.now * Set up basic functionality for display of vouchers for tutors * Create separate file for copy and paste button code and decaffeinate * Set up destruction of tutor vouchers * Rename view file as it containes embedded ruby * Add create action for vouchers and corresponding views * Adapt views and controller for adding and removing of vouchers of different type * Put duplicate lines into a separate method * Set up redeeming of vouchers * fix typo * remove obsolete methods * Avoid use of Time.now * Refactor active_vouhcer_of_sort method * remove unused expired? method * Remove duplicate code * remove unused variable * Add controller spec for vouchers * Rewrite controller spec for vouchers * remove obsolete comment * Invalidate vouchers instead of destroying them * Add vouchers for seminar speakers * Rename sort attribute of vouchers to role * Add cypress data attributes * Add first cypress tests * Add more cypress tests * Init future possibility to check clipboard content * Remove unnecessary call of trait * Use NO_SEMINAR_ROLES constant * Refactor JS for copy/paste button * Redesign voucher creation/deletion * Add explanations for what a voucher is * Fix minor UI inconsistencies * Revert downcasing Since in German, we cannot do that... * Improve cypress tests e.g. actually test format of UUID version 4 string * Indent if condition in HTML * Add TODO note to redeem controller method * Remove unnecessary comment * Group role-related stuff together in model * Improve voucher model specs * Update db/migrate/20240728123817_create_vouchers.rb Co-authored-by: Splines <[email protected]> * Add missing speaker trait * Use symbol for implicit order column * Update timestamp for create vouchers migration * Simplify ability handling via automatic resource loading See the docs: https://github.com/CanCanCommunity/cancancan/blob/develop/docs/controller_helpers.md#authorize_resource-load_resource-load_and_authorize_resource * Make whole copy button area clickable & simplify * Init time traveling in Cypress tests & test expired vouchers in frontend * Remove accidental `it.only` flag * Refactor Cypress voucher specs common assertions * Run `bundle install` again due to new version specifier (see also the merge comment before this commit) * Rename spec method * Improve cypress test description --------- Co-authored-by: Splines <[email protected]> Co-authored-by: Splines <[email protected]>
* Deal with registration edge cases in UserCleaner * Replace `last_sign_in_at` by `current_sign_in_at` * Simplify inactive_users method via usage of scopes * Add another scope for recently active users
* Rework contribution guide * Add current year to MIT License file * Update year in MaMpf footer
* Update Gemfile deps (`bundle update`) * Run `bundle update` again & pin js-routes to old version
* Always show annotations visible to teacher (should not be dependent on whether NEW annotations can be posted with the teacher or not) * Add cypress tests to avoid bug regression * Remove unnecessary "with_teacher_by_id" * Make UI visible in the viewport during cypress tests
…696) * Init with first ideas about proxies (not working yet) * Improve approach (still doesn't work) * Include temporary FactoryBot dynamic method assignment test * Add example for direct method assignment * Add first working example of dynamic method creation * Refactor first working minimal example * Allow dynamic method access only on .call object This is due to https://stackoverflow.com/q/79016566/9655481 * Implement call to instance methods * Also wrap `.then()` call * Remove custom rails number test method * Improve create() method docstring * Rename method to avoid confusion with "factories" * Add docstrings to transform_hash function & don't use Regex * Add Cypress tests to test array as argument * Allow creation of multiple users of same role e.g. multiple generic users * Fix creation of user in cypress tests This failed due to random hash added to the mail address in the last commit.
* Initialize voucher model and add some unit tests * Make ensure_no_other_active_voucher validation into a callback * Add throw :abort in order to halt execution * Replace Time.now by Time.zone.now * Set up basic functionality for display of vouchers for tutors * Create separate file for copy and paste button code and decaffeinate * Set up destruction of tutor vouchers * Rename view file as it containes embedded ruby * Add create action for vouchers and corresponding views * Adapt views and controller for adding and removing of vouchers of different type * Put duplicate lines into a separate method * Set up redeeming of vouchers * fix typo * remove obsolete methods * Avoid use of Time.now * Refactor active_vouhcer_of_sort method * remove unused expired? method * Remove duplicate code * remove unused variable * Add controller spec for vouchers * Rewrite controller spec for vouchers * remove obsolete comment * Set up redemption of tutor vouchers * Remove user lookup for tutor positions * Set up redemption of editor vouchers * Add Contract Model and setup selection of tutors and editors * Set up notifications for redemption of tutor vouchers * Invalidate vouchers instead of destroying them * Add redemption and claim models and rewrite workflow accordingly * Restore to previous state * Fix typo * Implement Rubocop suggestion * Replace voucher_hash by secure_hash * Replace redeem_voucher_params by check_voucher_params * Add cancel action to vouchers controller * Differentiate between different cases of tutor voucher redemption * Differentiate between different cases of editor voucher redemption * Take first steps in setting up redemption of teacher vouchers * Add notifications for redemption of teacher vouchers * Add notification mails for teacher change by voucher redemption * Invalidate teacher vouchers after first use * Add vouchers for seminar speakers * Add helpdesk for speaker vouchers * Set up redemption of speaker vouchers * Add notifications for redemption of speaker vouchers * Restrict access user select * Remove unused parameter * Introduce VoucherProcessor service object * Use common partial for redemption of tutor and speeaker vouchers * Rename sort attribute of vouchers to role * Rename remaining occurences of sort attribute of voucher to role * Add unit tests for VoucherProcessor * Add .uniq to method * Remove teacher selection for non-admins * Remove obsolete reference to non-existent model * Remove permissions from non-admins to change teachers * Add cypress data attributes * Add first cypress tests * Add more cypress tests * Add first cypress tests for voucher redemption * Init future possibility to check clipboard content * Add missing teacher field for non-admins * Add cypress tests for redemption form * Add cypress command .tomselect to select in TomSelect forms * Add test for redemption form using the new .tomselect command * Remove unnecessary call of trait * Use NO_SEMINAR_ROLES constant * Clean up some experiments * Remove .tomselect Command for cypress * Enlarge test user json by some data * Add logout command and expect correct statuses for login and logout requests * Add more cypress tests for redemption of tutor vouchers * Parse hashes with integer keys into arrays of strings * Add tests for tutor voucher redemption in the case that all tutorials are already taken * Add possibility to pass instance methods and refactor * Update documentation * Add tests for voucher redemption that check notifications * Add missing speaker voucher case * Add missing locales * Add cypress tests fo editor vouchers, teacher vouchers and speaker vouchers * Remove out of scope test * Refactor helper methods * Extract helper functions to separate file * Refactor tests * Extract more methods into helper * Rename files according to conventions * Add controller specs for changed lecture update policy * Refactor tests by extracting methods * Don't define `redeem` method twice Apparently I missed that one during the merge. * Pluralize voucher redemption spec filename * Delete duplicate migration & update new migration dates/schema * Move cypress helpers to e2e folder `support` folder should be used for general test-stuff, i.e. not-related to individual, specific tests. * Improve naming for voucher finding method also moved one private function around * Inline JSON object in user creator controller * Use symbolic keys upon voucher type case statement * Fix "Redeem voucher" spelling mistake * Use fixed width for voucher redemption selectize field * Rename view file to `voucher_redemption_form` * Fix indentation in view file (tutor voucher) * Replace cypress `describe` by `context` * Remove reviewer-TODO comments (selectize tomselect) * Reset Cypress-related code to 49cf16a Command used: git checkout 49cf16a -- ./.vscode/settings.json ./app/controllers/cypress/factories_controller.rb ./app/controllers/cypress/user_creator_controller.rb ./spec/cypress/support/factorybot.js * Use new .call syntax in cypress tests (in order to call instance methods, see #696 * Explicitly set `name_in_tutorials` for users * Remove constraint that user id must be a number This is such that UUIDs also work. * Init support for entity-relationship-diagram creation * Add `has_many :notifications` for better ERD visibility * Remove usage of delegate methods from redemption * Don't hardcode source_type as string * Refactor voucher_processor into model concern According to concepts discussed in #694. Also auto-load subdirectories in models folder and set Current.user for usage in models. * Add missing notification and subscribe lecture steps * Move vouchers down in UI (lecture edit page) * Turn off autocomplete for redeem voucher text field * Strip secure hash to avoid copy-pasting issues with voucher * Improve voucher-model docstrings * Fix wrong permit syntax for arrays * Move Claim model to voucher folder * Adapt Redeemer specs to new architecture Also rename Redeemable to Redeemer to better reflect what it's doing. * Use `pluck` instead of `select` for better performance Also use .uniq just to be sure. * Test timestamp in invalidate! voucher spec * Remove unused routes * Fix missing CSpell configuration * Improve tutor voucher redemption messages also remove unused locale keys * Improve speaker voucher redemption messages * Replace "Voucher" by "Gutschein" in German texts * Improve teacher voucher redemption messages * Improve editor voucher redemption messages * Remove duplicate `no_active_voucher` i18n key * Add help texts to voucher creation * Also eager_load additional modules This is to ensure that `Rails.application.eager_load!` in the rails_erd gem respects all our modules. See this line: https://github.com/voormedia/rails-erd/blob/7c66258b6818c47b4d878c2ad7ff6decebdf834a/lib/rails_erd/tasks.rake#L45 * Outsource x_by_redemption methods from lecture to redemption * Fix wrong i18n controller error The code always errored since the JSON objects are passed as strings from the frontend. * Fix cypress test (due to renaming of i18n keys / html) * Cypress test that whitespaces in voucher hash work * Verify voucher is invalid after user became teacher * Add user deletion cypress spec (for tutor) * Add word to cspell list * Replace "display" by "show" For me, "display" is closer to the frontend, while this is a backend test, that's why I renamed it. Not really that important in the end ;) * Fix two spelling mistakes (out of scope) * Move lecture notifications to separate file * Replace Notifier concern by LectureNotifier module * Remove unused set_recipients method for "new editor mail" * Move email templates to right folder * Correct sender_nad_locale setting * Introduce enqueue_mail_with_params matcher & test for editor * Add spec for Current user model * Inline sender_and_locale * Try to test email sending for editor voucher (fails) * Mock Current model in RSpec tests * Rework sender and locale setting * Fix mail sending test for editor * Test mail body (editor) * Set locale in broader scope test * Fix comment * Test previous and new teacher mail * Use custom html body matcher (ignore \r\n) * Improve wording in html body failure message * Test mails for co-speakers * Ensure user that is now speaker doesn't receive a mail * Use just one file for mail matchers * Rename matcher to enqueue_mail_including_params * Outsource from notification mailer assertion * Refactor send mail to co-speaker test * Remove unwanted test I accidentally added this even though it's not the wanted behavior. * Add tests for teacher selection dropdown * Write test for editor dropdown selection * Allow admin to select any user in lecture editor select * Remove `only` from cypress test * Add more words to spell checker * Add tests for tutor selection dropdown * Add back ability for admin to select any user as tutor * Allow admin to choose arbitrary users as speakers & test * Remove unnecessary display: none * Improve if statement in voucher redemption * Remove another unnecessary "be.visible" statement * Allow admins to select arbitrary users in existing talks & test * Rename lecture spec file * Refactor lecture people select spec (extract methods) * Reuse speaker_select helper * Outsource to new teacher_select helper * Outsource to new editors_select helper * Remove with_seminar trait (since we use the association field now, introduced a few commits beforehand) * Make cypress input selecting more reliable * Remove unnecessary div wrap * Avoid flaky test by intercepting user fill request * Fix cypress not typing "cy" in input box * Remove current_user= test as method was removed * Intercept /talks/new route to avoid flaky test This is due to the form not being completely loaded while we already go on. * Add cy.wait as last resort * Visit #people page directly * Remove unwanted `only` in Cypress test --------- Co-authored-by: Splines <[email protected]>
* Update rubocop-related Gems * Safe autocorrect Lint/SafeNavigationConsistency * Increase max for Style/SafeNavigationChainLength * Increase max of safe navigation chain length to 4
* Update Node.js deps * Update Node.js dependencies again
* Add "no results" messages indicating the new voucher system * Remove left-over console log
* Remove everything from profile & add basic card grid layout * Add back first elements as cards * Add back in voucher and user data (gdpr) * Avoid nested voucher form * Add margin in mobile view when stacked * Pimp up profile card styling & add voucher redemption pattern * Move GDPR to account & use full-width for courses * Add modal for data request * Show toast upon data request * Add text to notification toast upon data request * Delete unused file (from now on unused) * Improve request data modal explanation text * Fix card header border radius * Make accordion background transparent * Decaffeinate profile code * Account for border also in voucher redemption box * Add custom wrapper class to reduce checkbox margin * Ensure equal height columns * Improve unsaved changes btn & show immediately * Add helpdesk to redeem voucher form * Print some labels in bold * Change "unsaved changed" button to warning color * Add back in accordion id * Add another div for the voucher redeem content * Replace "einige Daten" by "bestimmte Daten" * Move javascript include tag to end to avoid initialization issues * Use $(document).ready() to not miss load events * Show unsaved changes also at bottom (for small displays) * Only add margin for big displays * Fix margins below redeem voucher card * Remove left-over console log * Improve data request sent toast message * Improve redeem voucher form for small displays * Wrap text in unsaved changes button on small displays * Improve wording of content tag search & add tooltip * Use other pattern for voucher redemption card * Test changing user name (cypress) * Test changing user tutorial submission name (cypress) * Remove further `custom: true` occurrences * Test if language is correctly switched (cypress) * Start writing module settings cypress test * use voronoi pattern for voucher redemption card Signed-off-by: Florian <[email protected]> * Fix flaky language switch test & refactor * Add test for module settings (allow to subscribe to a lecture) * Remove cypress `.only` --------- Signed-off-by: Florian <[email protected]> Co-authored-by: Florian <[email protected]>
* Set retry option to false for UserCleanerJob (#715) * Deal with registration edge cases in UserCleaner (#693) (#716) * Deal with registration edge cases in UserCleaner * Replace `last_sign_in_at` by `current_sign_in_at` * Simplify inactive_users method via usage of scopes * Add another scope for recently active users * Fix unknown user variable after deletion (#717) * Fix unknown user variable after deletion * Adjust other occurrence of method * Update failing user cleaner jobs with new method signature * Expect user email for deletion mail * Fix `with` syntax --------- Co-authored-by: fosterfarrell9 <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #723 +/- ##
==========================================
+ Coverage 53.84% 54.28% +0.44%
==========================================
Files 157 170 +13
Lines 6649 7346 +697
==========================================
+ Hits 3580 3988 +408
- Misses 3069 3358 +289 ☔ View full report in Codecov by Sentry. |
* Wait for submissions POST request * Remove plural `s`
* Add cy.then after logout/login * Wait for delete account request to have finished
fosterfarrell9
approved these changes
Dec 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! LGTM.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.