Skip to content
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

Implement or remove pending tests #4803

Merged
merged 20 commits into from
Apr 7, 2022
Merged

Implement or remove pending tests #4803

merged 20 commits into from
Apr 7, 2022

Commits on Apr 7, 2022

  1. Remove comments related to code from Madrid

    CONSUL doesn't implement blank votes via web; the comment was based on
    the code used in Madrid, which was actually very complex.
    
    And the concept of "all city" was also specific to Madrid. Poll
    questions aren't associated to a geozone, so the geozone will depend on
    the poll they're associated to.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    b89c358 View commit details
    Browse the repository at this point in the history
  2. Remove obsolete pending test reference

    The test "Sender email" already checks the receiver's name appears in
    the copy sent to the sender.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    1f55be7 View commit details
    Browse the repository at this point in the history
  3. Remove map page in debates

    The map feature was never implemented for debates (only for proposals
    and budget investments) and it was crashing for debates because the page
    didn't load the geozones. And we don't have a "geozone" field in the
    debates form either.
    
    So we're removing the map page alongside its (pending implementation)
    tests.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    3752fef View commit details
    Browse the repository at this point in the history
  4. Enable poll comments test

    This feature was actually implemented, but the test was checking the
    wrong selectors.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    c777594 View commit details
    Browse the repository at this point in the history
  5. Allow commenting on polls as moderator/admin

    So it works the same way as everywhere else.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    0eb666d View commit details
    Browse the repository at this point in the history
  6. Remove duplicate map test

    We were skipping the test, but there's an identical test right below it.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    42b8729 View commit details
    Browse the repository at this point in the history
  7. Remove unnecessary condition to skip tag list test

    This file only has tests related to tags; if the model doesn't have
    tags, we simply wouldn't include `it_behaves_as` in their tests instead
    of including it and then skipping it.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    d5867db View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fa15ac0 View commit details
    Browse the repository at this point in the history
  9. Enable test checking alert to finish valuation

    It looks like it was disabled because it was failing sometimes for some
    reason. I haven't found the reason, though; we're changing the test a
    little bit to make it easier to read. Enabling it will let us find out
    whether it still fails.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    6ddb22c View commit details
    Browse the repository at this point in the history
  10. Enable passing legislation comment test

    It was disabled in commit 792b15b for unknown reasons.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    695d5d8 View commit details
    Browse the repository at this point in the history
  11. Implement tests to disable homepage settings

    They were marked as pending.
    
    Note Capybara doesn't support finding a button by its `aria-labelledby`
    attribute, so we're using the ugly `click_button "Yes"`, like we did in
    commit fabe97e.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    6c322e2 View commit details
    Browse the repository at this point in the history
  12. Remove pending tag cloud test for debates

    This feature was only enabled for proposals five years ago, and it
    hasn't changed since then. The pending test only gets in the way.
    
    Implement. Or implement not. There is no pending.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    4a8a4ea View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c579127 View commit details
    Browse the repository at this point in the history
  14. Remove pending reportable tests

    These tests are obsolete since commit 5ed308c.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    702fc84 View commit details
    Browse the repository at this point in the history
  15. Remove unnecessary locales check in specs

    We define the available locales in the test environment, so Spanish is
    always available in this environment even if it isn't available in the
    production environment.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    2927174 View commit details
    Browse the repository at this point in the history
  16. Use if instead of skip to skip tests

    This way the tests won't appear as "pending" when running the test
    suite, and so we get rid of a lot of noise in the test results. There
    doesn't seem to be a way to call `skip` without the test being marked as
    "pending".
    
    Note that in the globalizable tests we need to build a factory before
    deciding whether an atribute is required or not (particularly for the
    milestone factory, since milestone attributes are required depending on
    the presence of other attributes). This isn't possible before we're
    inside the test, so we can't add an `if:` condition to the test. So
    we're adding the condition inside the test instead. A minor
    inconvenience of this method is the test still runs even when the
    condition is `false`.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    e49c326 View commit details
    Browse the repository at this point in the history
  17. Complete proposal notification test

    We were finishing the test with the first "visit", so it was doing
    nothing (other than potentially generating concurrency issues with other
    tests).
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    c0f71c4 View commit details
    Browse the repository at this point in the history
  18. Remove obsolete "pending" test

    I'd say this feature is actually tested in the "proposal polls specific
    validations"; the empty test was probably added by accident in commit
    4b8cc85.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    fb99d8c View commit details
    Browse the repository at this point in the history
  19. Fix error messages for question answer images

    Since we were creating a new answer in the form, we weren't getting the
    errors associated to the answer the administrator was trying to create,
    and so we were skipping the test.
    
    Using the answer which contains the information about validation errors
    fixes the issue and so we don't have to skip the tests.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    e637bce View commit details
    Browse the repository at this point in the history
  20. Remove unnecessary "pending" comment

    The test is already working with poll question answers (which are the
    only ones using `has_many_images`) as well.
    javierm committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    b68aa67 View commit details
    Browse the repository at this point in the history