Skip to content

Commit

Permalink
Changes for Unittest cases and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarkhaire committed Oct 4, 2023
1 parent 6a4231e commit f89aae1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
use Drupal\apigee_edge\Entity\DeveloperCompaniesCacheInterface;
use Drupal\apigee_edge\SDKConnectorInterface;
use Drupal\apigee_edge_teams\CompanyMembershipObjectCacheInterface;
use Drupal\apigee_edge_teams\Form\TeamAliasForm;

/**
* Definition of the Team controller service.
Expand Down Expand Up @@ -260,8 +261,9 @@ public function getEntities(PagerInterface $pager = NULL, string $key_provider =
];
}
else {
$defaultChannelId = TeamAliasForm::originalChannelId();
$queryparam = [
'filter' => 'channelId=devportal',
'filter' => 'channelId=' . $defaultChannelId,
];
}
$entities = $this->decorated()->getEntities($pager, $key_provider, $queryparam);
Expand Down
2 changes: 1 addition & 1 deletion modules/apigee_edge_teams/src/Form/TeamAliasForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#type' => 'checkbox',
'#title' => $this->t('Filter by Channel ID'),
'#default_value' => $config->get('enablefilter'),
'#description' => $this->t('Enables the filter with Channel ID for AppGroups listing'),
'#description' => $this->t('Enforce the filtering of AppGroups based on Channel ID specified in the field above.'),
];
}
return parent::buildForm($form, $form_state);
Expand Down
6 changes: 4 additions & 2 deletions modules/apigee_edge_teams/tests/src/Functional/UiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,11 @@ protected function teamsWorkflowTest() {
* Tests the team entity label modifications.
*/
protected function teamAndTeamAppLabelTest() {
$team_name = mb_strtolower($this->getRandomGenerator()->name());
$team_app_1_name = mb_strtolower($this->getRandomGenerator()->name());
$this->drupalLogin($this->rootUser);
$this->changeEntityAliasesAndValidate('team', 'apigee_edge_teams.settings.team');
$this->changeEntityAliasesAndValidate('team_app', 'apigee_edge_teams.settings.team_app');
$this->changeEntityAliasesAndValidate($team_name, 'apigee_edge_teams.settings.team');
$this->changeEntityAliasesAndValidate($team_app_1_name, 'apigee_edge_teams.settings.team_app');
}

/**
Expand Down

0 comments on commit f89aae1

Please sign in to comment.