Discourse Custom Wizard main does not work on tests-passed

Discourse Custom Wizard either has a bug, or is incompatible with the Discourse commit linked below.

Time: 2023-11-07T00:13:09+00:00
Message: ci / backend_tests has failed: Process completed with exit code 1.

Discourse

Branch: tests-passed
SHA:

Plugin

Branch: main
SHA:

Details

@development_team - is this a problem?

Usually it’s a matter of going into github and restarting the test. Going to do that right now.

1 Like

Nope, tests keep failing, changing this to issue

 1) CustomWizard::UpdateValidator doesn't validate date time field if the format is not respected
     Failure/Error: updater.validate
     
     NoMethodError:
       undefined method `ctx_load' for PrettyText:Module
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:131:in `v8'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:94:in `validate_date'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:57:in `validate_field'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:13:in `block in perform'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:12:in `each'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:12:in `perform'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/step_updater.rb:44:in `validate'
     # ./plugins/discourse-custom-wizard/spec/components/custom_wizard/update_validator_spec.rb:16:in `perform_validation'
     # ./plugins/discourse-custom-wizard/spec/components/custom_wizard/update_validator_spec.rb:180:in `block (2 levels) in <main>'
     # ./spec/rails_helper.rb:485:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:480:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:469:in `block (2 levels) in <top (required)>'

  2) CustomWizard::UpdateValidator validates date time fields
     Failure/Error: updater.validate
     
     NoMethodError:
       undefined method `ctx_load' for PrettyText:Module
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:131:in `v8'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:94:in `validate_date'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:57:in `validate_field'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:13:in `block in perform'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:12:in `each'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:12:in `perform'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/step_updater.rb:44:in `validate'
     # ./plugins/discourse-custom-wizard/spec/components/custom_wizard/update_validator_spec.rb:16:in `perform_validation'
     # ./plugins/discourse-custom-wizard/spec/components/custom_wizard/update_validator_spec.rb:170:in `block (2 levels) in <main>'
     # ./spec/rails_helper.rb:485:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:480:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:469:in `block (2 levels) in <top (required)>'

  3) CustomWizard::UpdateValidator doesn't validate date field if the format is not respected
     Failure/Error: updater.validate
     
     NoMethodError:
       undefined method `ctx_load' for PrettyText:Module
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:131:in `v8'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:94:in `validate_date'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:57:in `validate_field'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:13:in `block in perform'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:12:in `each'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:12:in `perform'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/step_updater.rb:44:in `validate'
     # ./plugins/discourse-custom-wizard/spec/components/custom_wizard/update_validator_spec.rb:16:in `perform_validation'
     # ./plugins/discourse-custom-wizard/spec/components/custom_wizard/update_validator_spec.rb:160:in `block (2 levels) in <main>'
     # ./spec/rails_helper.rb:485:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:480:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:469:in `block (2 levels) in <top (required)>'

  4) CustomWizard::UpdateValidator validates date fields
     Failure/Error: updater.validate
     
     NoMethodError:
       undefined method `ctx_load' for PrettyText:Module
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:131:in `v8'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:94:in `validate_date'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:57:in `validate_field'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:13:in `block in perform'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:12:in `each'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/validators/update.rb:12:in `perform'
     # ./plugins/discourse-custom-wizard/lib/custom_wizard/step_updater.rb:44:in `validate'
     # ./plugins/discourse-custom-wizard/spec/components/custom_wizard/update_validator_spec.rb:16:in `perform_validation'
     # ./plugins/discourse-custom-wizard/spec/components/custom_wizard/update_validator_spec.rb:150:in `block (2 levels) in <main>'
     # ./spec/rails_helper.rb:485:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:480:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:469:in `block (2 levels) in <top (required)>'

Fixed.

3 Likes

124 second bug fix :+1: :star_struck:

1 Like

Discourse Custom Wizard has recovered from this issue.