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

[email protected] Stop Portugal, Romania, and New Zealand support & adding Slovakia country #2529

Merged
merged 4 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/components/organisms/f-header/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v10.20.0

_May 16, 2024_

### Changed

- Stop Portugal, Romania, and New Zealand support.
- Support new country Slovakia.

## v10.19.0

_March 13, 2024_
Expand Down
2 changes: 1 addition & 1 deletion packages/components/organisms/f-header/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@justeat/f-header",
"description": "Fozzie Header - Globalised Header Component",
"version": "10.19.0",
"version": "10.20.0",
"main": "dist/f-header.umd.min.js",
"maxBundleSize": "55kB",
"files": [
Expand Down
48 changes: 22 additions & 26 deletions packages/components/organisms/f-header/src/components/FlagIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@

<script>
import {
FlagAtRoundIcon as FlagIconAt,
FlagBeRoundIcon as FlagIconBe,
FlagBgRoundIcon as FlagIconBg,
FlagCaRoundIcon as FlagIconCa,
FlagChRoundIcon as FlagIconCh,
FlagDkRoundIcon as FlagIconDk,
FlagAuRoundIcon as FlagIconAu,
FlagFrRoundIcon as FlagIconFr,
FlagDeRoundIcon as FlagIconDe,
FlagIeRoundIcon as FlagIconIe,
FlagIlRoundIcon as FlagIconIl,
FlagItRoundIcon as FlagIconIt,
FlagLuRoundIcon as FlagIconLu,
FlagNlRoundIcon as FlagIconNl,
FlagNzRoundIcon as FlagIconNz,
FlagNoRoundIcon as FlagIconNo,
FlagPlRoundIcon as FlagIconPl,
FlagPtRoundIcon as FlagIconPt,
FlagRoRoundIcon as FlagIconRo,
FlagEsRoundIcon as FlagIconEs,
FlagGbRoundIcon as FlagIconGb
} from '@justeat/f-vue-icons';
FlagAustriaIcon as FlagIconAt,
FlagAustraliaIcon as FlagIconAu,
FlagBelgiumIcon as FlagIconBe,
FlagBulgariaIcon as FlagIconBg,
FlagCanadaIcon as FlagIconCa,
FlagSwitzerlandIcon as FlagIconCh,
FlagDenmarkIcon as FlagIconDk,
FlagGermanyIcon as FlagIconDe,
FlagFranceIcon as FlagIconFr,
FlagUnitedKingdomIcon as FlagIconGb,
FlagIrelandIcon as FlagIconIe,
FlagIsraelIcon as FlagIconIl,
FlagItalyIcon as FlagIconIt,
FlagLuxemburgIcon as FlagIconLu,
FlagNetherlandsIcon as FlagIconNl,
FlagNorwayIcon as FlagIconNo,
FlagPolandIcon as FlagIconPl,
FlagSpainIcon as FlagIconEs,
FlagSlovakiaIcon as FlagIconSk
} from '@justeattakeaway/pie-icons-vue';

export default {
components: {
Expand All @@ -43,13 +41,11 @@ export default {
FlagIconIt,
FlagIconLu,
FlagIconNl,
FlagIconNz,
FlagIconNo,
FlagIconPl,
FlagIconPt,
FlagIconRo,
FlagIconEs,
FlagIconGb
FlagIconGb,
FlagIconSk
},

props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,6 @@ describe('Header', () => {
expect(wrapper.attributes('data-theme')).toBe('ml');
});

it('should render ml themed component if NZ local passed', () => {
// Arrange
const propsData = {
locale: 'en-NZ',
headerBackgroundTheme: 'transparent'
};

// Act
const wrapper = shallowMount(Header, { propsData });

// Assert
expect(wrapper.attributes('data-theme')).toBe('ml');
});


it('should render jet themed component if shouldUseJetLogo prop is true even when there is no locale', () => {
// Arrange
Expand Down
36 changes: 9 additions & 27 deletions packages/components/organisms/f-header/src/tenants/countryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,6 @@ export default [
siteUrl: 'https://www.thuisbezorgd.nl',
gtm: 'click_country_nl'
},
{
key: 'nz',
flagKey: 'nz',
dataTestKey: 'nz',
lang: 'en',
localisedName: 'New Zealand',
siteUrl: 'https://www.menulog.co.nz',
gtm: 'click_country_nz'
},
{
key: 'no',
flagKey: 'no',
Expand All @@ -161,24 +152,6 @@ export default [
siteUrl: 'https://www.pyszne.pl',
gtm: 'click_country_pl'
},
{
key: 'pt',
flagKey: 'pt',
dataTestKey: 'pt',
lang: 'pt',
localisedName: 'Portugal',
siteUrl: 'https://www.takeaway.com/pt',
gtm: 'click_country_pt'
},
{
key: 'ro',
flagKey: 'ro',
dataTestKey: 'ro',
lang: 'ro',
localisedName: 'România',
siteUrl: 'https://www.takeaway.com/ro',
gtm: 'click_country_ro'
},
{
key: 'es',
flagKey: 'es',
Expand Down Expand Up @@ -214,5 +187,14 @@ export default [
localisedName: 'Suisse',
siteUrl: 'https://www.eat.ch/fr',
gtm: 'click_country_ch_fr'
},
{
key: 'sk',
flagKey: 'sk',
dataTestKey: 'sk',
lang: 'sk',
localisedName: 'Slovakia',
siteUrl: 'https://www.bistro.sk/',
gtm: 'click_country_sk'
}
];
74 changes: 0 additions & 74 deletions packages/components/organisms/f-header/src/tenants/en-NZ.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/components/organisms/f-header/src/tenants/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import uk from './en-GB';
import au from './en-AU';
import nz from './en-NZ';
import es from './es-ES';
import ie from './en-IE';
import it from './it-IT';
Expand All @@ -9,7 +8,6 @@ import countries from './countryList';
const tenantConfigs = {
'en-GB': uk,
'en-AU': au,
'en-NZ': nz,
'es-ES': es,
'en-IE': ie,
'it-IT': it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ HeaderComponent.argTypes = {
locale: {
control: { type: 'select' },
description: 'Select a tenant',
options: ['en-GB', 'en-AU', 'en-IE', 'en-NZ', 'es-ES', 'it-IT']
options: ['en-GB', 'en-AU', 'en-IE', 'es-ES', 'it-IT']
},

headerBackgroundTheme: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ describe('Accessibility tests', () => {
const locales = [
'en-GB',
'en-AU',
'en-NZ',
'en-IE',
'it-IT',
'es-ES'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ describe('Desktop - f-header component tests', () => {
{ expectedLocale: 'it', expectedUrl: 'justeat.it' },
{ expectedLocale: 'lu', expectedUrl: 'takeaway.com/lu' },
{ expectedLocale: 'nl', expectedUrl: 'thuisbezorgd.nl' },
{ expectedLocale: 'nz', expectedUrl: 'menulog.co.nz' },
{ expectedLocale: 'no', expectedUrl: 'just-eat.no' },
{ expectedLocale: 'pl', expectedUrl: 'pyszne.pl' },
{ expectedLocale: 'pt', expectedUrl: 'takeaway.com/pt' },
{ expectedLocale: 'ro', expectedUrl: 'takeaway.com/ro' },
{ expectedLocale: 'es', expectedUrl: 'just-eat.es' },
{ expectedLocale: 'ch_ch', expectedUrl: 'eat.ch' },
{ expectedLocale: 'ch_en', expectedUrl: 'eat.ch/en' },
{ expectedLocale: 'ch_fr', expectedUrl: 'eat.ch/fr' }
{ expectedLocale: 'ch_fr', expectedUrl: 'eat.ch/fr' },
{ expectedLocale: 'sk', expectedUrl: 'bistro.sk' }
];

tests.forEach(({ expectedLocale, expectedUrl }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ describe('Shared - f-header component tests', () => {
{ tenant: 'en-GB', isLoggedIn: false },
{ tenant: 'en-AU', isLoggedIn: true },
{ tenant: 'en-AU', isLoggedIn: false },
{ tenant: 'en-NZ', isLoggedIn: true },
{ tenant: 'en-NZ', isLoggedIn: false },
{ tenant: 'en-IE', isLoggedIn: true },
{ tenant: 'en-IE', isLoggedIn: false },
{ tenant: 'it-IT', isLoggedIn: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ describe('Shared - f-header component tests', () => {
{ tenant: 'en-GB', isLoggedIn: false },
{ tenant: 'en-AU', isLoggedIn: true },
{ tenant: 'en-AU', isLoggedIn: false },
{ tenant: 'en-NZ', isLoggedIn: true },
{ tenant: 'en-NZ', isLoggedIn: false },
{ tenant: 'en-IE', isLoggedIn: true },
{ tenant: 'en-IE', isLoggedIn: false },
{ tenant: 'it-IT', isLoggedIn: true },
Expand Down
Loading