File tree Expand file tree Collapse file tree 3 files changed +10
-16
lines changed
Expand file tree Collapse file tree 3 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -36,19 +36,12 @@ const fetchJson = (url: string) => {
3636
3737
3838const getAlgorithmType = ( algorithm : Algorithm ) : AlgorithmType => {
39- const applicationLink = algorithm . links . find ( l => l . rel === 'application' )
40-
41- if ( ! applicationLink ) {
42- return AlgorithmType . NONE
43- }
44-
45- switch ( applicationLink . type ) {
46- case 'application/cwl+yaml' :
47- return AlgorithmType . OGC_API_PROCESS ;
48- case 'application/vnd.openeo+json;type=process' :
49- return AlgorithmType . OPENEO ;
50- default :
51- return AlgorithmType . NONE
39+ if ( algorithm . conformsTo . includes ( 'https://apex.esa.int/core/openeo-udp' ) ) {
40+ return AlgorithmType . OPENEO ;
41+ } else if ( algorithm . conformsTo . includes ( 'https://apex.esa.int/core/ogc-api-processes' ) ) {
42+ return AlgorithmType . OGC_API_PROCESS ;
43+ } else {
44+ return AlgorithmType . NONE ;
5245 }
5346}
5447
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ test.describe('Catalog Tests', () => {
1010 await expect ( page ) . toHaveTitle ( 'Algorithm Services Catalogue | APEx' ) ;
1111 await expect ( page . getByRole ( 'heading' , { level : 1 } ) ) . toContainText ( 'Algorithm Services Catalogue' ) ;
1212
13- const card = page . getByTestId ( 'service-card' ) . getByText ( 'ESA worldcereal global maize detector' ) . locator ( '..' ) ;
13+ const card = page . getByTestId ( 'service-card' ) . getByText ( 'ESA worldcereal global crop type detector' ) . locator ( '..' ) ;
1414 await expect ( card ) . toBeVisible ( )
1515
1616 await expect ( card . getByTestId ( 'service-type' ) ) . toHaveText ( 'openEO' ) ;
Original file line number Diff line number Diff line change 11import { expect , type Page , test } from '@playwright/test' ;
22
3+
34const openService = async ( page : Page , name : string ) => {
45 await page . getByTestId ( 'service-card' ) . getByText ( name ) . first ( ) . click ( ) ;
56}
@@ -12,8 +13,8 @@ test.describe('Service Details Test', () => {
1213
1314 test ( "Should open the details page" , async ( { page} ) => {
1415
15- await openService ( page , 'ESA worldcereal global maize detector' ) ;
16- await page . waitForURL ( '**/apps/worldcereal_crop_extent ' ) ;
16+ await openService ( page , 'ESA worldcereal global crop type detector' ) ;
17+ await page . waitForURL ( '**/apps/worldcereal_crop_type ' ) ;
1718 } ) ;
1819
1920 test ( "Should show the correct links for an openEO service" , async ( { page} ) => {
You can’t perform that action at this time.
0 commit comments