OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
GNU Lesser General Public License v3.0
419 stars 40 forks source link

front: add e2e tests deleting a rolling stock #7851

Closed Maymanaf closed 1 week ago

Maymanaf commented 2 weeks ago

Closes: #7774

codecov-commenter commented 2 weeks ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 28.32%. Comparing base (dc11fc8) to head (d154d7e).

Files Patch % Lines
...s/RollingStockEditor/RollingStockEditorButtons.tsx 0.00% 3 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #7851 +/- ## ============================================ - Coverage 28.33% 28.32% -0.01% Complexity 2059 2059 ============================================ Files 1270 1270 Lines 155543 155546 +3 Branches 3055 3055 ============================================ - Hits 44070 44059 -11 - Misses 109649 109663 +14 Partials 1824 1824 ``` | [Flag](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7851/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [core](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `75.00% <ø> (ø)` | | | [editoast](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `71.24% <ø> (-0.04%)` | :arrow_down: | | [front](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `9.95% <0.00%> (-0.01%)` | :arrow_down: | | [gateway](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `2.34% <ø> (ø)` | | | [railjson_generator](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `87.49% <ø> (ø)` | | | [tests](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7851/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `72.93% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Akctarus commented 1 week ago

With @RomainValls, we found that the test does not pass 100% of the time, because the "delete" button is not visible if the rolling stock name is too long. The bug is known and is being resolved

Maymanaf commented 1 week ago

With @RomainValls, we found that the test does not pass 100% of the time, because the "delete" button is not visible if the rolling stock name is too long. The bug is known and is being resolved

I added a data-testidto directly locate the buttons, and limited the length of the generated name by UUID to 6 characters, avoiding this problem