Skip to content

Commit

Permalink
SONAR-22764 Do not show project bind hint for non projects (#11850)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarath-nair-sonarsource authored and sonartech committed Sep 25, 2024
1 parent 7ff1ec1 commit d83706d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default function PageHeader(props: Readonly<Props>) {
</div>
</>
)}
{githubProvisioningStatus && !isGitHubProject && (
{githubProvisioningStatus && !isGitHubProject && isProject(component.qualifier) && (
<FlagMessage variant="warning" className="sw-mt-2">
{translate('project_permission.local_project_with_github_provisioning')}
</FlagMessage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,22 @@ describe('GitHub provisioning', () => {
.every((item) => item.getAttributeNames().includes('disabled')),
).toBe(false);
});

it.each([ComponentQualifier.Portfolio, ComponentQualifier.Application])(
'shoudlnt show sync warning for portfolio and applications',
async (qualifier) => {
const user = userEvent.setup();
const ui = getPageObject(user);
dopTranslationHandler.gitHubConfigurations.push(
mockGitHubConfiguration({ provisioningType: ProvisioningType.auto }),
);
renderPermissionsProjectApp({ qualifier }, { featureList: [Feature.GithubProvisioning] });
await ui.appLoaded();

expect(ui.pageTitle.get()).toBeInTheDocument();
expect(ui.nonGHProjectWarning.query()).not.toBeInTheDocument();
},
);
});

describe('GitLab provisioning', () => {
Expand Down

0 comments on commit d83706d

Please sign in to comment.