it('should not be able to grant permission if the profile is built-in', async () => {
renderQualityProfile('sonar');
await ui.waitForDataLoaded();
- expect(await screen.findByText('Sonar way')).toBeInTheDocument();
+ expect(screen.getByRole('heading', { name: /\bSonar way\b/ })).toBeInTheDocument();
expect(ui.permissionSection.query()).not.toBeInTheDocument();
});
});
renderQualityProfile();
await ui.waitForDataLoaded();
- expect(await screen.findByText('Good old PHP quality profile')).toBeInTheDocument();
+ expect(
+ await screen.findByRole('heading', { name: 'Good old PHP quality profile' }),
+ ).toBeInTheDocument();
await user.click(ui.qualityProfileActions.get());
await user.click(ui.extendButton.get());