docbrown/spec
Ridhwana 530e927060
Add ability to re-run a data script from the the data update script page (#12424)
* feat: add an error column to the data update script

* feat: save the error to the error field

* feat: save the error when the script fails

* feat: show the script error on the data update script page

* chore: pass the error to mark_as_failed instead of having its own function

* refactor: use presence

* test: ensure that we test an error case of a data update script

* chore: rename errorneous to failing

* test: update some specs, working on the others

* chore: update tests now that there are two files

* chore: change error from a string to a text to allow for more char

* feat: order the data update scripts by the latest script that ran

* feat: when the script has succeeded reset error to nil

* feat: create a model function that will allow the script to be force run

* chore: oops remove the functions form the worker to the model so it can be re-used

* feat: create an endpoint that will call the model method force run when we hit the api by clicking the button

* feat: ensure that the we add an ajax call that calls the controller endpoint

* chore: remove newline

* refactor: change to a more Restful route

* refactor: use Stimulus

* fix: move the code from the model back into the worker so that we can reuse it in the controller

* feat:call the worker in the force_run action and create a show route

* feat: very first draft of using a polling mechanism on the show method after we kickoff the sidekiq job (still need to error handle)

* chore: some syntax changes and unused variables

* fix: call the method correctly with the paramters

* feat: do some error handling

* feat: error handing on the frontend

* chore: use e instead of err

* refactor: just pass the id instead of the whole script

* chore: remove the button

* fix: allow the id to be passed

* feat: handle errors better

* feat: limit the filename column width

* refactor: use a common function to set the banner error

* test: add a test fro rerun button

* test: v1 of the data update script request

* test: write some specs for the js controller

* Update app/controllers/admin/data_update_scripts_controller.rb

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

* tests: update the data worker spec

* chore: clean up the js controller and its tests

* chore: remove whitespaces

* chore: swap the functions based on the controller

* chore: updates to the UI

* chore: remove the standard error catch

* chore: update the alert and error messages

* chore: remove test for error handling for sidekiq run

Co-authored-by: Michael Kohl <me@citizen428.net>
2021-02-02 17:24:39 +02:00
..
black_box Routine rubocop fixes (#10237) 2020-09-08 12:06:47 -04:00
decorators Improve cumulative layout shift on comment reactions + optimizations (#12309) 2021-01-18 19:29:44 -05:00
factories Update NavigationLink handling (#12316) 2021-01-20 13:57:59 -05:00
fixtures Deployment Task: Update onboarding fields prior to #11629 (#11704) 2020-12-07 14:57:18 -05:00
generator Add service generator (#11265) 2020-11-10 09:09:35 +07:00
helpers Replace authentication_enabled_providers.include? with helper method (#12379) 2021-01-22 07:54:10 -06:00
initializers Refactor:Implement Carrierwave Monkeypatch in all Envs (#11233) 2020-11-03 10:51:53 -06:00
lib Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
liquid_tags Improve user subscription UX flow when latency is high (#11735) 2020-12-03 12:25:32 -08:00
mailers Replace collective_noun with community_name (#11846) [deploy] 2020-12-28 09:34:17 -07:00
models Optimization: Set ForemInstance.deployed_at Locally to Better Mirror Production (#12500) 2021-02-01 07:43:23 -06:00
policies [EOY2020 Issue] Default new forems to Email Authentication only (#11696) 2020-12-02 16:49:07 -05:00
queries/admin Add all new functionality for trusted (#10816) 2020-10-15 17:00:49 -04:00
refinements Update data exporter to handle admin send (#10274) 2020-10-26 18:00:56 -04:00
requests Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
routing Redirect old settings routes to new ones (#11681) 2020-11-30 16:54:31 +01:00
serializers/search [deploy] Refactor:Remove Reaction Search Code (#10377) 2020-09-23 12:27:50 -05:00
services Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
support Cleaning Test Runs for End to End (E2E) Tests (#12143) 2021-01-29 13:34:01 +01:00
system Verify link is available and wait for JS before testing (#12492) 2021-01-29 15:42:08 -05:00
tasks Refactor:Send Welcome Broadcast Notifications From Sidekiq (#9923) 2020-08-21 12:57:08 -04:00
uploaders Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556) 2020-07-29 11:31:01 +02:00
view_objects Enable Rubocop 0.89 cops and fix Lint/ violations (#9709) 2020-08-10 16:57:12 +02:00
views Add max_bytes to imgproxy. (#12110) 2021-01-04 14:41:32 -05:00
workers Add ability to re-run a data script from the the data update script page (#12424) 2021-02-02 17:24:39 +02:00
rails_helper.rb Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
spec_helper.rb Manually load dotenv in test (#9971) 2020-08-24 20:19:03 +02:00