Skip to content

Commit

Permalink
Added code to filter response for API.getReportPagesMetadata and API.…
Browse files Browse the repository at this point in the history
…getWidgetMetadata (#18233)

* Added code to filter response for API.getReportPagesMetadata and API.getWidgetMetadata, #DEV-2366

* Updated filters check when the filterkey is array

* Added testcases with filter for API.getWidgetMetadata and API.getReportPagesMetadata
  • Loading branch information
AltamashShaikh authored Nov 2, 2021
1 parent bd326ab commit 1ff7444
Show file tree
Hide file tree
Showing 4 changed files with 1,738 additions and 17 deletions.
20 changes: 20 additions & 0 deletions plugins/CustomDimensions/tests/System/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public static function setUpBeforeClass(): void

self::setAllowedModulesToFilterApiResponse('API.getReportMetadata', array('CustomDimensions'));
self::setAllowedCategoriesToFilterApiResponse('API.getSegmentsMetadata', array('Visitors', 'Behaviour'));
self::setAllowedModulesToFilterApiResponse('API.getWidgetMetadata', array('CustomDimensions'));
self::setAllowedCategoriesToFilterApiResponse('API.getReportPagesMetadata', array('Visitors', 'Behaviour'));
}

/**
Expand Down Expand Up @@ -187,6 +189,24 @@ public function getApiForTesting()
)
);

$apiToTest[] = array(
array('API.getReportPagesMetadata'),
array(
'idSite' => 1,
'date' => self::$fixture->dateTime,
'periods' => array('day')
)
);

$apiToTest[] = array(
array('API.getWidgetMetadata'),
array(
'idSite' => 1,
'date' => self::$fixture->dateTime,
'periods' => array('day')
)
);

$apiToTest[] = array(array('API.getProcessedReport'),
array(
'idSite' => 1,
Expand Down
Loading

0 comments on commit 1ff7444

Please sign in to comment.