Skip to content

Commit

Permalink
Missions - Corrections après revue de la synchronisation en mode iso-…
Browse files Browse the repository at this point in the history
…prod (#2871)

## Linked issues

- Resolve #2820

----

- [ ] Tests E2E (Cypress)
  • Loading branch information
louptheron authored Feb 6, 2024
2 parents 00e3160 + 84215ab commit 1b2630a
Show file tree
Hide file tree
Showing 11 changed files with 649 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
package fr.gouv.cnsp.monitorfish.domain.entities

import com.neovisionaries.i18n.CountryCode
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.catchThrowable
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.springframework.test.context.junit.jupiter.SpringExtension
import java.time.ZonedDateTime
import java.util.*

@ExtendWith(SpringExtension::class)
class CountryCodeUTests {

@Test
fun `country codes from NAVPRO should be included in CountryCode library`() {
// Given these country codes from NAVPRO
val countryCodesFromNavpro = listOf(
"NA",
"NE",
"NF",
"NG",
"NI",
"NL",
"NO",
"NP",
"NR",
"NU",
"NZ",
"OM",
"PA",
"PE",
"PF",
"PG",
"PH",
"PK",
"PL",
"PM",
"PN",
"PR",
"PS",
"PT",
"PW",
"PY",
"QA",
"RE",
"RO",
"RU",
"RW",
"SA",
"SB",
"SC",
"SD",
"SE",
"SG",
"SH",
"SI",
"SJ",
"SK",
"SL",
"SM",
"SN",
"SO",
"SR",
"ST",
"SV",
"SY",
"SZ",
"TC",
"TD",
"TF",
"TG",
"TH",
"TJ",
"TK",
"TM",
"TN",
"TO",
"TP",
"TR",
"TT",
"TV",
"TW",
"TZ",
"UA",
"UG",
"UM",
"US",
"UY",
"UZ",
"VA",
"VC",
"VE",
"VG",
"VI",
"VN",
"VU",
"WF",
"WS",
"YE",
"YT",
"YU",
"ZA",
"ZM",
"ZW",
"CS",
"MA",
"AI",
"AQ",
"BO",
"BW",
"CF",
"CV",
"DO",
"ER",
"FX",
"GB",
"GQ",
"GT",
"GY",
"HM",
"IO",
"KH",
"KZ",
"LC",
"MP",
"MW",
"NC",
"BR",
"CH",
"CO",
"DM",
"EG",
"FJ",
"FO",
"GI",
"IL",
"JM",
"KI",
"KP",
"KY",
"LR",
"MH",
"MV",
"MZ",
"AE",
"AN",
"AS",
"BA",
"BH",
"BN",
"AG",
"BG",
"CD",
"FI",
"GW",
"IN",
"KR",
"LU",
"MT",
"MD",
"AD",
"AF",
"AL",
"AM",
"AO",
"AR",
"AT",
"AU",
"AW",
"AZ",
"BB",
"BD",
"BE",
"BF",
"BI",
"BJ",
"BM",
"BS",
"BT",
"BV",
"BY",
"BZ",
"CA",
"CC",
"CG",
"CI",
"CK",
"CL",
"CM",
"CN",
"CR",
"CU",
"CX",
"CY",
"CZ",
"DE",
"DJ",
"DK",
"DZ",
"EC",
"EE",
"EH",
"ES",
"ET",
"FK",
"FM",
"FR",
"GA",
"GD",
"GE",
"GF",
"GH",
"GL",
"GM",
"GN",
"GP",
"GR",
"GS",
"GU",
"HK",
"HN",
"HR",
"HT",
"HU",
"ID",
"IE",
"IQ",
"IR",
"IS",
"IT",
"JO",
"JP",
"KE",
"KG",
"KM",
"KN",
"KW",
"LA",
"LB",
"LI",
"LK",
"LS",
"LT",
"LV",
"LY",
"MC",
"MG",
"MK",
"ML",
"MM",
"MN",
"MO",
"MQ",
"MR",
"MS",
"MU",
"MX",
"MY",
"CW",
"GG",
"IM",
"JE",
"ME",
"BQ",
"BL",
"MF",
"SX",
"RS",
"SS",
)

// When
countryCodesFromNavpro.forEach {
val code = CountryCode.getByCode(it)

println("Found $code for $it")
assertThat(code).isNotNull()
}
}
}
8 changes: 8 additions & 0 deletions frontend/cypress/mappings/get-control-units.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,14 @@
"contact": null,
"isArchived": false,
"resources": []
},
{
"id": 10039,
"administration": "Réserves Naturelles",
"name": "Réserve Naturelle 7 Iles (archivée)",
"contact": null,
"isArchived": true,
"resources": []
}
]
}
Expand Down
Loading

0 comments on commit 1b2630a

Please sign in to comment.