portagenetwork / roadmap

Developed by the the Alliance in collaboration with University of Alberta, DMP Assistant a data management planning tool, forking the DMP Roadmap codebase
MIT License
6 stars 1 forks source link

Address Flaky RSpec Tests #810

Open aaronskiba opened 1 week ago

aaronskiba commented 1 week ago

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

Details

aaronskiba commented 1 week ago
Failures:

  1) SuperAdmins Merge Orgs Super admin merges an Org into another Org
     Failure/Error:
       @target_org = Org.includes(:templates, :tracker, :annotations,
                                  :departments, :token_permission_types, :funded_plans,
                                  identifiers: [:identifier_scheme],
                                  guidance_groups: [guidances: [:themes]],
                                  users: [identifiers: [:identifier_scheme]])
                        .find(lookup.id)

     NoMethodError:
       undefined method `id' for nil:NilClass
     # ./app/controllers/super_admin/orgs_controller.rb:121:in `merge_analyze'
     # ------------------
     # --- Caused by: ---
     # Capybara::ExpectationNotMet:
     #   expected to find text "Summary:" in "My Dashboard\nCreate plans\n  Reference\nHelp\nAbout\n  Gayle Kassulke\nPurdy, Willms and Rowe\n  Admin\nOrganisation details\nView all organisations\nProfile information\nRequest feedback\nSchools/Departments\nMerge\n\nMerge Organisations\nPlease select the Organisation that will replace the current organisation: 'Friesen, Schinner and Ankunding'.\nThen click the 'analyze' button to review the proposed changes. Note that no changes will take place until you have reviewed and approve of the changes.\nOrganisation\nAnalyze\n© 2004 - 2024 Digital Research Alliance of Canada\n•\nContact us\nTerms of use\nPrivacy statement\nGitHub"
     #   ./spec/features/super_admins/merge_org_spec.rb:51:in `block (2 levels) in <top (required)>'
aaronskiba commented 1 week ago
Failures:

  1) Registrations User creates a new acccount
     Failure/Error: expect(current_path).to eql(plans_path)

       expected: "/plans"
            got: "/"

       (compared using eql?)
     # ./spec/features/registrations_spec.rb:29:in `block (2 levels) in <top (required)>'
aaronskiba commented 1 week ago
Failures:

  1) Repository scopes #search returns repositories with name like the search term
     Failure/Error: expect(results.include?(@never_found)).to eql(false)

       expected: false
            got: true

       (compared using eql?)

       Diff:
       @@ -1 +1 @@
       -false
       +true
     # ./spec/models/repository_spec.rb:97:in `block (4 levels) in <top (required)>'
aaronskiba commented 6 days ago
Failures:

  1) Annotations::Editing Admin changes an Annotation of a draft Template
     Failure/Error: expect(Annotation.order('created_at').last.text).to eql('<p>Noo bar</p>')

       expected: "<p>Noo bar</p>"
            got: "Foo bar"

       (compared using eql?)
     # ./spec/features/annotations/annotations_editing_spec.rb:59:in `block (2 levels) in <top (required)>'