Skip to content

Commit 50ec7e3

Browse files
authored
[email protected] Stop Portugal, Romania, and New Zealand support & adding Slovakia country (#2529)
* Remove PT, RO, and NZ support in f-header component * bumb * Support Slovakia * update icon imports
1 parent 128ec75 commit 50ec7e3

File tree

12 files changed

+44
-154
lines changed

12 files changed

+44
-154
lines changed

packages/components/organisms/f-header/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## v10.20.0
7+
8+
_May 16, 2024_
9+
10+
### Changed
11+
12+
- Stop Portugal, Romania, and New Zealand support.
13+
- Support new country Slovakia.
14+
615
## v10.19.0
716

817
_March 13, 2024_

packages/components/organisms/f-header/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@justeat/f-header",
33
"description": "Fozzie Header - Globalised Header Component",
4-
"version": "10.19.0",
4+
"version": "10.20.0",
55
"main": "dist/f-header.umd.min.js",
66
"maxBundleSize": "55kB",
77
"files": [

packages/components/organisms/f-header/src/components/FlagIcon.vue

+22-26
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,26 @@
44

55
<script>
66
import {
7-
FlagAtRoundIcon as FlagIconAt,
8-
FlagBeRoundIcon as FlagIconBe,
9-
FlagBgRoundIcon as FlagIconBg,
10-
FlagCaRoundIcon as FlagIconCa,
11-
FlagChRoundIcon as FlagIconCh,
12-
FlagDkRoundIcon as FlagIconDk,
13-
FlagAuRoundIcon as FlagIconAu,
14-
FlagFrRoundIcon as FlagIconFr,
15-
FlagDeRoundIcon as FlagIconDe,
16-
FlagIeRoundIcon as FlagIconIe,
17-
FlagIlRoundIcon as FlagIconIl,
18-
FlagItRoundIcon as FlagIconIt,
19-
FlagLuRoundIcon as FlagIconLu,
20-
FlagNlRoundIcon as FlagIconNl,
21-
FlagNzRoundIcon as FlagIconNz,
22-
FlagNoRoundIcon as FlagIconNo,
23-
FlagPlRoundIcon as FlagIconPl,
24-
FlagPtRoundIcon as FlagIconPt,
25-
FlagRoRoundIcon as FlagIconRo,
26-
FlagEsRoundIcon as FlagIconEs,
27-
FlagGbRoundIcon as FlagIconGb
28-
} from '@justeat/f-vue-icons';
7+
FlagAustriaIcon as FlagIconAt,
8+
FlagAustraliaIcon as FlagIconAu,
9+
FlagBelgiumIcon as FlagIconBe,
10+
FlagBulgariaIcon as FlagIconBg,
11+
FlagCanadaIcon as FlagIconCa,
12+
FlagSwitzerlandIcon as FlagIconCh,
13+
FlagDenmarkIcon as FlagIconDk,
14+
FlagGermanyIcon as FlagIconDe,
15+
FlagFranceIcon as FlagIconFr,
16+
FlagUnitedKingdomIcon as FlagIconGb,
17+
FlagIrelandIcon as FlagIconIe,
18+
FlagIsraelIcon as FlagIconIl,
19+
FlagItalyIcon as FlagIconIt,
20+
FlagLuxemburgIcon as FlagIconLu,
21+
FlagNetherlandsIcon as FlagIconNl,
22+
FlagNorwayIcon as FlagIconNo,
23+
FlagPolandIcon as FlagIconPl,
24+
FlagSpainIcon as FlagIconEs,
25+
FlagSlovakiaIcon as FlagIconSk
26+
} from '@justeattakeaway/pie-icons-vue';
2927
3028
export default {
3129
components: {
@@ -43,13 +41,11 @@ export default {
4341
FlagIconIt,
4442
FlagIconLu,
4543
FlagIconNl,
46-
FlagIconNz,
4744
FlagIconNo,
4845
FlagIconPl,
49-
FlagIconPt,
50-
FlagIconRo,
5146
FlagIconEs,
52-
FlagIconGb
47+
FlagIconGb,
48+
FlagIconSk
5349
},
5450
5551
props: {

packages/components/organisms/f-header/src/components/_tests/Header.test.js

-14
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,6 @@ describe('Header', () => {
5151
expect(wrapper.attributes('data-theme')).toBe('ml');
5252
});
5353

54-
it('should render ml themed component if NZ local passed', () => {
55-
// Arrange
56-
const propsData = {
57-
locale: 'en-NZ',
58-
headerBackgroundTheme: 'transparent'
59-
};
60-
61-
// Act
62-
const wrapper = shallowMount(Header, { propsData });
63-
64-
// Assert
65-
expect(wrapper.attributes('data-theme')).toBe('ml');
66-
});
67-
6854

6955
it('should render jet themed component if shouldUseJetLogo prop is true even when there is no locale', () => {
7056
// Arrange

packages/components/organisms/f-header/src/tenants/countryList.js

+9-27
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,6 @@ export default [
134134
siteUrl: 'https://www.thuisbezorgd.nl',
135135
gtm: 'click_country_nl'
136136
},
137-
{
138-
key: 'nz',
139-
flagKey: 'nz',
140-
dataTestKey: 'nz',
141-
lang: 'en',
142-
localisedName: 'New Zealand',
143-
siteUrl: 'https://www.menulog.co.nz',
144-
gtm: 'click_country_nz'
145-
},
146137
{
147138
key: 'no',
148139
flagKey: 'no',
@@ -161,24 +152,6 @@ export default [
161152
siteUrl: 'https://www.pyszne.pl',
162153
gtm: 'click_country_pl'
163154
},
164-
{
165-
key: 'pt',
166-
flagKey: 'pt',
167-
dataTestKey: 'pt',
168-
lang: 'pt',
169-
localisedName: 'Portugal',
170-
siteUrl: 'https://www.takeaway.com/pt',
171-
gtm: 'click_country_pt'
172-
},
173-
{
174-
key: 'ro',
175-
flagKey: 'ro',
176-
dataTestKey: 'ro',
177-
lang: 'ro',
178-
localisedName: 'România',
179-
siteUrl: 'https://www.takeaway.com/ro',
180-
gtm: 'click_country_ro'
181-
},
182155
{
183156
key: 'es',
184157
flagKey: 'es',
@@ -214,5 +187,14 @@ export default [
214187
localisedName: 'Suisse',
215188
siteUrl: 'https://www.eat.ch/fr',
216189
gtm: 'click_country_ch_fr'
190+
},
191+
{
192+
key: 'sk',
193+
flagKey: 'sk',
194+
dataTestKey: 'sk',
195+
lang: 'sk',
196+
localisedName: 'Slovakia',
197+
siteUrl: 'https://www.bistro.sk/',
198+
gtm: 'click_country_sk'
217199
}
218200
];

packages/components/organisms/f-header/src/tenants/en-NZ.js

-74
This file was deleted.

packages/components/organisms/f-header/src/tenants/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import uk from './en-GB';
22
import au from './en-AU';
3-
import nz from './en-NZ';
43
import es from './es-ES';
54
import ie from './en-IE';
65
import it from './it-IT';
@@ -9,7 +8,6 @@ import countries from './countryList';
98
const tenantConfigs = {
109
'en-GB': uk,
1110
'en-AU': au,
12-
'en-NZ': nz,
1311
'es-ES': es,
1412
'en-IE': ie,
1513
'it-IT': it

packages/components/organisms/f-header/stories/header.stories.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ HeaderComponent.argTypes = {
6464
locale: {
6565
control: { type: 'select' },
6666
description: 'Select a tenant',
67-
options: ['en-GB', 'en-AU', 'en-IE', 'en-NZ', 'es-ES', 'it-IT']
67+
options: ['en-GB', 'en-AU', 'en-IE', 'es-ES', 'it-IT']
6868
},
6969

7070
headerBackgroundTheme: {

packages/components/organisms/f-header/test/accessibility/axe-accessibility.spec.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ describe('Accessibility tests', () => {
44
const locales = [
55
'en-GB',
66
'en-AU',
7-
'en-NZ',
87
'en-IE',
98
'it-IT',
109
'es-ES'

packages/components/organisms/f-header/test/component/f-header.component.spec.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ describe('Desktop - f-header component tests', () => {
4040
{ expectedLocale: 'it', expectedUrl: 'justeat.it' },
4141
{ expectedLocale: 'lu', expectedUrl: 'takeaway.com/lu' },
4242
{ expectedLocale: 'nl', expectedUrl: 'thuisbezorgd.nl' },
43-
{ expectedLocale: 'nz', expectedUrl: 'menulog.co.nz' },
4443
{ expectedLocale: 'no', expectedUrl: 'just-eat.no' },
4544
{ expectedLocale: 'pl', expectedUrl: 'pyszne.pl' },
46-
{ expectedLocale: 'pt', expectedUrl: 'takeaway.com/pt' },
47-
{ expectedLocale: 'ro', expectedUrl: 'takeaway.com/ro' },
4845
{ expectedLocale: 'es', expectedUrl: 'just-eat.es' },
4946
{ expectedLocale: 'ch_ch', expectedUrl: 'eat.ch' },
5047
{ expectedLocale: 'ch_en', expectedUrl: 'eat.ch/en' },
51-
{ expectedLocale: 'ch_fr', expectedUrl: 'eat.ch/fr' }
48+
{ expectedLocale: 'ch_fr', expectedUrl: 'eat.ch/fr' },
49+
{ expectedLocale: 'sk', expectedUrl: 'bistro.sk' }
5250
];
5351

5452
tests.forEach(({ expectedLocale, expectedUrl }) => {

packages/components/organisms/f-header/test/visual/f-header.visual.desktop.spec.js

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ describe('Shared - f-header component tests', () => {
88
{ tenant: 'en-GB', isLoggedIn: false },
99
{ tenant: 'en-AU', isLoggedIn: true },
1010
{ tenant: 'en-AU', isLoggedIn: false },
11-
{ tenant: 'en-NZ', isLoggedIn: true },
12-
{ tenant: 'en-NZ', isLoggedIn: false },
1311
{ tenant: 'en-IE', isLoggedIn: true },
1412
{ tenant: 'en-IE', isLoggedIn: false },
1513
{ tenant: 'it-IT', isLoggedIn: true },

packages/components/organisms/f-header/test/visual/f-header.visual.mobile.spec.js

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ describe('Shared - f-header component tests', () => {
88
{ tenant: 'en-GB', isLoggedIn: false },
99
{ tenant: 'en-AU', isLoggedIn: true },
1010
{ tenant: 'en-AU', isLoggedIn: false },
11-
{ tenant: 'en-NZ', isLoggedIn: true },
12-
{ tenant: 'en-NZ', isLoggedIn: false },
1311
{ tenant: 'en-IE', isLoggedIn: true },
1412
{ tenant: 'en-IE', isLoggedIn: false },
1513
{ tenant: 'it-IT', isLoggedIn: true },

0 commit comments

Comments
 (0)