Skip to content

Commit

Permalink
Remove PT, RO, and NZ support in f-header component
Browse files Browse the repository at this point in the history
  • Loading branch information
phatpt8 committed May 17, 2024
1 parent 128ec75 commit dc821b7
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 132 deletions.
8 changes: 8 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,14 @@
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.

## v10.19.0

_March 13, 2024_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ import {
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';
Expand All @@ -43,11 +40,8 @@ export default {
FlagIconIt,
FlagIconLu,
FlagIconNl,
FlagIconNz,
FlagIconNo,
FlagIconPl,
FlagIconPt,
FlagIconRo,
FlagIconEs,
FlagIconGb
},
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
27 changes: 0 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
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,11 +40,8 @@ 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' },
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

0 comments on commit dc821b7

Please sign in to comment.