etalab/transport-site

Test fragile (ou régression Elixir 1.17 / OTP 27)

Opened this issue · 1 comments

Observé en travaillant sur:

  1) test quality indicators chart is displayed (TransportWeb.DatasetControllerTest)
     apps/transport/test/transport_web/controllers/dataset_controller_test.exs:599
     Assertion with == failed
     code:  assert [
              {"table", [{"class", "table"}],
               [
                 {"tr", [], [{"th", [], ["Conformité"]}, {"th", [], ["Fraicheur"]}]},
                 {"tr", [], [{"td", [], ["80%"]}, {"td", [], ["55%"]}]}
               ]}
            ] == content |> Floki.find("#quality-indicators table")
     left:  [{"table", [{"class", "table"}], [{"tr", [], [{"th", [], ["Conformité"]}, {"th", [], ["Fraicheur"]}]}, {"tr", [], [{"td", [], ["80%"]}, {"td", [], ["55%"]}]}]}]
     right: [{"table", [{"class", "table"}], [{"tr", [], [{"th", [], ["Fraicheur"]}, {"th", [], ["Conformité"]}]}, {"tr", [], [{"td", [], ["55%"]}, {"td", [], ["80%"]}]}]}]
     stacktrace:
       test/transport_web/controllers/dataset_controller_test.exs:636: (test)

Je ne sais pas à ce stade si c'est une régression lié aux upgrades techniques, ou un test déjà fragile avant.

thbar commented

Ça semble bien, en relisant l'erreur, être un souci d'ordre, typique des changements de fonctionnement des maps avec OTP. Je garde ouvert.