aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/permissions
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/permissions')
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx7
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/routes.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/test-utils.ts1
11 files changed, 19 insertions, 15 deletions
diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx
index e7f8be8d33b..abc6822f46d 100644
--- a/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx
@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Title } from 'design-system';
-import * as React from 'react';
+
+import { Title } from '~design-system';
import { translate } from '../../../../helpers/l10n';
export default function PageHeader() {
diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx
index 57566f63873..cb600b701c2 100644
--- a/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx
@@ -18,10 +18,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system';
import { without } from 'lodash';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
+import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system';
import { ComponentQualifier } from '~sonar-aligned/types/component';
import * as api from '../../../../api/permissions';
import withAppStateContext, {
diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx
index 2aea662cae4..b5f614462ce 100644
--- a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { without } from 'lodash';
@@ -67,7 +68,8 @@ describe('rendering', () => {
const user = userEvent.setup();
const ui = getPageObject(user);
renderPermissionsGlobalApp();
- await ui.appLoaded();
+
+ expect(await ui.pageTitle.find()).toBeInTheDocument();
without(
flattenPermissionsList(PERMISSIONS_ORDER_GLOBAL),
@@ -91,7 +93,8 @@ describe('rendering', () => {
const user = userEvent.setup();
const ui = getPageObject(user);
renderPermissionsGlobalApp(mockAppState({ qualifiers: [qualifier] }));
- await ui.appLoaded();
+
+ expect(await ui.pageTitle.find()).toBeInTheDocument();
permissions.forEach((permission) => {
expect(ui.globalPermissionCheckbox('johndoe', permission).get()).toBeInTheDocument();
diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx
index 1c642dc64ac..6c47af9e198 100644
--- a/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx
@@ -17,6 +17,8 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
+import * as React from 'react';
import {
ButtonPrimary,
FlagMessage,
@@ -24,8 +26,7 @@ import {
InputSelect,
LabelValueSelectOption,
Modal,
-} from 'design-system';
-import * as React from 'react';
+} from '~design-system';
import { applyTemplateToProject, getPermissionTemplates } from '../../../../api/permissions';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { PermissionTemplate } from '../../../../types/types';
diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx
index 419e7b6a536..ae1906f47e4 100644
--- a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx
@@ -19,8 +19,8 @@
*/
import { Button, ButtonVariety } from '@sonarsource/echoes-react';
-import { FlagMessage, Title } from 'design-system';
import * as React from 'react';
+import { FlagMessage, Title } from '~design-system';
import { Image } from '~sonar-aligned/components/common/Image';
import { isPortfolioLike } from '~sonar-aligned/helpers/component';
import GitHubSynchronisationWarning from '../../../../app/components/GitHubSynchronisationWarning';
diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx
index dd458cd1b06..5daa3306d15 100644
--- a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx
@@ -17,10 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system';
+
import { noop, without } from 'lodash';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
+import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system';
import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import * as api from '../../../../api/permissions';
import { getComponents } from '../../../../api/project-management';
diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx
index abb7a4706f0..0c2caed0398 100644
--- a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx
@@ -18,7 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import VisibilitySelector from '../../../../components/common/VisibilitySelector';
import {
useIsGitHubProjectQuery,
diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx
index 7c649c75e27..46211a1db0b 100644
--- a/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx
@@ -18,8 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { FlagMessage } from 'design-system';
-import * as React from 'react';
+import { FlagMessage } from '~design-system';
import ConfirmModal from '../../../../components/controls/ConfirmModal';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx
index c1d2be79d89..75bebf943af 100644
--- a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
@@ -92,9 +93,8 @@ describe('rendering', () => {
const user = userEvent.setup();
const ui = getPageObject(user);
renderPermissionsProjectApp({ qualifier, visibility: Visibility.Private });
- await ui.appLoaded();
- expect(screen.getByText(description)).toBeInTheDocument();
+ expect(await screen.findByText(description)).toBeInTheDocument();
permissions.forEach((permission) => {
expect(ui.projectPermissionCheckbox('johndoe', permission).get()).toBeInTheDocument();
});
diff --git a/server/sonar-web/src/main/js/apps/permissions/routes.tsx b/server/sonar-web/src/main/js/apps/permissions/routes.tsx
index c2fa8129d22..1d3f57a68ac 100644
--- a/server/sonar-web/src/main/js/apps/permissions/routes.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/routes.tsx
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import React from 'react';
+
import { Route } from 'react-router-dom';
import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent';
diff --git a/server/sonar-web/src/main/js/apps/permissions/test-utils.ts b/server/sonar-web/src/main/js/apps/permissions/test-utils.ts
index 2e2eb11c4ee..080fbec4f22 100644
--- a/server/sonar-web/src/main/js/apps/permissions/test-utils.ts
+++ b/server/sonar-web/src/main/js/apps/permissions/test-utils.ts
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
import { waitFor } from '@testing-library/react';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';