Skip to content

Commit

Permalink
Release for 22-Aug on demo environment
Browse files Browse the repository at this point in the history
  • Loading branch information
g-nardiello committed Aug 28, 2024
1 parent 3fd23f5 commit 0bdc75a
Show file tree
Hide file tree
Showing 48 changed files with 23,023 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
8 changes: 8 additions & 0 deletions __test__/basic.test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

describe ('jestInstallation', () => {
it('basic assert work', () => {
const ok = 'ok';

expect(ok).toBe('ok')
})
})
278 changes: 278 additions & 0 deletions __test__/stringCreate.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
import { createQueryString } from '../app/utilities/StringCreateFilter';
import { Layer } from '../app/slice/layerMenuSlice';

describe('String Create Query ', () => {
it('filter list undefined', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: undefined,
label: 'layer',
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe("''");
});

it('FilterByAttribute con 1 Attributo', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: {
filterByAttribute: [
{ key: 'Origin_EN', value: 'European continental platform' }
]
},
filterConfiguration: {
layerName: 'Tecto_Units_augm_filtered',
filterConfigurationByTectoUnitsTerm: [
{
idVocabulary: 'Tecto',
queryNarrower: '',
attributeToFilter: ['Tecto_lexic']
}
],
},
label: 'layer',
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe('Tecto_Units_augm_filtered:"Origin_EN" = \'European continental platform\'');
});

it('FilterByAttribute con + Attributi', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: {
filterByAttribute: [
{ key: 'Origin_EN', value: 'European continental platform' },
{ key: 'Litho_EN', value: 'Molasse (Cenozoic)' },
{ key: 'Shape_Area', value: '159457153.91848147' }
]
},
label: 'layer',
filterConfiguration: {
layerName: 'Tecto_Units_augm_filtered',
filterConfigurationByTectoUnitsTerm: [
{
idVocabulary: 'Tecto',
queryNarrower: '',
attributeToFilter: ['Tecto_lexic']
}
],
},
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe('Tecto_Units_augm_filtered:"Origin_EN" = \'European continental platform\' AND "Litho_EN" = \'Molasse (Cenozoic)\' AND "Shape_Area" = \'159457153.91848147\'');
});

it('FilterByTecnoTerms con 1 Valore senza narrower', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: {
filterByTectoUnitsTerm: [
{ term: 'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau', includeNarrowers: false }
]
},
label: 'layer',
filterConfiguration: {
layerName: 'Tecto_Units_augm_filtered',
filterConfigurationByTectoUnitsTerm: [
{
idVocabulary: 'Tecto',
queryNarrower: '',
attributeToFilter: ['Tecto_lexic']
}
],
},
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe('Tecto_Units_augm_filtered:"Tecto_lexic" IN ( \'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau\' )');
});

it('FilterByTecnoTerms con 1 Valore con narrower', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: {
filterByTectoUnitsTerm: [
{
term: 'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau',
narrowers: [
'https://lexic.swissgeol.ch/TectonicUnits/SilberenSlices',
'https://lexic.swissgeol.ch/TectonicUnits/MonteRosaNappe'
],
includeNarrowers: true
}
]
},
filterConfiguration: {
layerName: 'Tecto_Units_augm_filtered',
filterConfigurationByTectoUnitsTerm: [
{
idVocabulary: 'Tecto',
queryNarrower: '',
attributeToFilter: ['Tecto_lexic']
}
],
},
label: 'layer',
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe('Tecto_Units_augm_filtered:"Tecto_lexic" IN ( \'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau\' , \'https://lexic.swissgeol.ch/TectonicUnits/SilberenSlices\' , \'https://lexic.swissgeol.ch/TectonicUnits/MonteRosaNappe\' )');
});

it('FilterByAttribute con 1 Attributo e FilterByTecnoTerms con 1 Valore senza narrower', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: {
filterByAttribute: [
{ key: 'Origin_EN', value: 'European continental platform' }
],
filterByTectoUnitsTerm: [
{ term: 'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau', includeNarrowers: false }
]
},
label: 'layer',
filterConfiguration: {
layerName: 'Tecto_Units_augm_filtered',
filterConfigurationByTectoUnitsTerm: [
{
idVocabulary: 'Tecto',
queryNarrower: '',
attributeToFilter: ['Tecto_lexic']
}
],
},
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe('Tecto_Units_augm_filtered:"Origin_EN" = \'European continental platform\' AND "Tecto_lexic" IN ( \'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau\' )');
});

it('FilterByAttribute con 1 Attributo e FilterByTecnoTerms con 1 Valore con narrower', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: {
filterByAttribute: [
{ key: 'Origin_EN', value: 'European continental platform' }
],
filterByTectoUnitsTerm: [
{
term: 'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau',
narrowers: [
'https://lexic.swissgeol.ch/TectonicUnits/HauteSaonePlatform'
],
includeNarrowers: true
}
]
},
label: 'layer',
filterConfiguration: {
layerName: 'Tecto_Units_augm_filtered',
filterConfigurationByTectoUnitsTerm: [
{
idVocabulary: 'Tecto',
queryNarrower: '',
attributeToFilter: ['Tecto_lexic']
}
],
},
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe('Tecto_Units_augm_filtered:"Origin_EN" = \'European continental platform\' AND "Tecto_lexic" IN ( \'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau\' , \'https://lexic.swissgeol.ch/TectonicUnits/HauteSaonePlatform\' )');
});

it('FilterByAttribute con + Attributi e FilterByTecnoTerms con 1 Valore senza narrower', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: {
filterByAttribute: [
{ key: 'Origin_EN', value: 'European continental platform' },
{ key: 'Litho_EN', value: 'Molasse (Cenozoic)' },
{ key: 'Shape_Area', value: '159457153.91848147' }
],
filterByTectoUnitsTerm: [
{ term: 'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau', includeNarrowers: false }
]
},
label: 'layer',
filterConfiguration: {
layerName: 'Tecto_Units_augm_filtered',
filterConfigurationByTectoUnitsTerm: [
{
idVocabulary: 'Tecto',
queryNarrower: '',
attributeToFilter: ['Tecto_lexic']
}
],
},
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe('Tecto_Units_augm_filtered:"Origin_EN" = \'European continental platform\' AND "Litho_EN" = \'Molasse (Cenozoic)\' AND "Shape_Area" = \'159457153.91848147\' AND "Tecto_lexic" IN ( \'https://lexic.swissgeol.ch/TectonicUnits/InternalFoldedJuraAndForelandPlateau\' )');
});

it('FilterByAttribute con + Attributi e FilterByTecnoTerms con 1 Valore con narrower', () => {
const layer: Layer = {
id: 'Tecto_Units_augm_filtered',
filters: {
filterByAttribute: [
{ key: 'Origin_EN', value: 'European continental platform' },
{ key: 'Shape_Area', value: '3222452787.5111227' }
],
filterByTectoUnitsTerm: [
{
term: 'https://lexic.swissgeol.ch/TectonicUnits/SouthGermanPlatform',
narrowers: [
'https://lexic.swissgeol.ch/TectonicUnits/SouthGermanPlatform'
],
includeNarrowers: true
}
]
},
label: 'layer',
filterConfiguration: {
layerName: 'Tecto_Units_augm_filtered',
filterConfigurationByTectoUnitsTerm: [
{
idVocabulary: 'Tecto',
queryNarrower: '',
attributeToFilter: ['Tecto_lexic']
}
],
},
isChecked: false,
canFilter: false,
canGetFeatureInfo: false
};

const queryString = createQueryString(layer);
expect(queryString).toBe('Tecto_Units_augm_filtered:"Origin_EN" = \'European continental platform\' AND "Shape_Area" = \'3222452787.5111227\' AND "Tecto_lexic" IN ( \'https://lexic.swissgeol.ch/TectonicUnits/SouthGermanPlatform\' , \'https://lexic.swissgeol.ch/TectonicUnits/SouthGermanPlatform\' )');
});
});
Loading

0 comments on commit 0bdc75a

Please sign in to comment.