Skip to content

Commit

Permalink
[frontend] e2e tests dashboards CRUD operations
Browse files Browse the repository at this point in the history
  • Loading branch information
lndrtrbn committed Jun 10, 2024
1 parent eb9a2c1 commit 9039a3d
Show file tree
Hide file tree
Showing 27 changed files with 611 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ services:
- pip3 install --upgrade --force .
- cd /tmp/e2e-start-platform/opencti-graphql
- yarn build:dev
- yarn wait-api && yarn insert:dev &
- yarn wait-api && yarn insert:dev --datasets=DATA-TEST-STIX2_v2,data-test-stix-e2e &
- NODE_OPTIONS=--max_old_space_size=8192 yarn start

volumes:
Expand Down
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,7 @@
"When enforcing 2FA authentication, all users will be asked to enable 2FA to be able to login in the platform.": "Wenn Sie die 2FA-Authentifizierung erzwingen, werden alle Benutzer aufgefordert, 2FA zu aktivieren, um sich bei der Plattform anmelden zu können.",
"When you specified the platform organization, data without any organization restriction will be accessible only for users that are part of the platform one": "Wenn Sie die Plattformorganisation angegeben haben, sind die Daten ohne Organisationsbeschränkung nur für Benutzer zugänglich, die Teil der Plattform sind",
"Widget": "Widget",
"Widget popover of actions": "Widget-Popover der Aktionen",
"Windows scheduled tasks": "Geplante Windows-Aufgaben",
"Windows services": "Windows-Dienste",
"WITH": "MIT",
Expand All @@ -2736,6 +2737,7 @@
"Workflows": "Arbeitsabläufe",
"Works": "Werke",
"Workspace": "Arbeitsbereich",
"Workspace popover of actions": "Arbeitsbereich-Popover von Aktionen",
"Workspaces": "Arbeitsbereiche",
"Write": "Schreiben",
"Write a note": "Schreiben Sie eine Notiz",
Expand Down
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,7 @@
"When enforcing 2FA authentication, all users will be asked to enable 2FA to be able to login in the platform.": "When enforcing 2FA authentication, all users will be asked to enable 2FA to be able to login in the platform.",
"When you specified the platform organization, data without any organization restriction will be accessible only for users that are part of the platform one": "When you specified the platform organization, data without any organization restriction will be accessible only for users that are part of the platform one",
"Widget": "Widget",
"Widget popover of actions": "Widget popover of actions",
"Windows scheduled tasks": "Windows scheduled tasks",
"Windows services": "Windows services",
"WITH": "WITH",
Expand All @@ -2736,6 +2737,7 @@
"Workflows": "Workflows",
"Works": "Works",
"Workspace": "Workspace",
"Workspace popover of actions": "Workspace popover of actions",
"Workspaces": "Workspaces",
"Write": "Write",
"Write a note": "Write a note",
Expand Down
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,7 @@
"When enforcing 2FA authentication, all users will be asked to enable 2FA to be able to login in the platform.": "Al aplicar la autenticación 2FA, se pedirá a todos los usuarios que habiliten 2FA para poder iniciar sesión en la plataforma.",
"When you specified the platform organization, data without any organization restriction will be accessible only for users that are part of the platform one": "Cuando especificó la organización de la plataforma, los datos sin ninguna restricción de organización serán accesibles solo para los usuarios que forman parte de la plataforma.",
"Widget": "Elemento gráfico",
"Widget popover of actions": "Widget popover de acciones",
"Windows scheduled tasks": "Tareas programadas de Windows",
"Windows services": "Servicios de Windows",
"WITH": "CON",
Expand All @@ -2736,6 +2737,7 @@
"Workflows": "Flujos de trabajo",
"Works": "Ejecuciones",
"Workspace": "Espacio de trabajo",
"Workspace popover of actions": "Espacio de trabajo emergente de acciones",
"Workspaces": "Espacios de trabajo",
"Write": "Redacción",
"Write a note": "Escribir una nota",
Expand Down
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,7 @@
"When enforcing 2FA authentication, all users will be asked to enable 2FA to be able to login in the platform.": "Lors de l’application de l'authentication à deux facteurs, tous les utilisateurs seront invités à activer l'authentication à deux facteurs pour pouvoir se connecter à la plate-forme.",
"When you specified the platform organization, data without any organization restriction will be accessible only for users that are part of the platform one": "Lorsque vous avez spécifié l'organisation de la plateforme, les données sans aucune restriction d'organisation ne seront accessibles qu'aux utilisateurs faisant partie de celle ci",
"Widget": "Widget",
"Widget popover of actions": "Widget popover d'actions",
"Windows scheduled tasks": "Tâches planifiées Windows",
"Windows services": "Services Windows",
"WITH": "AVEC",
Expand All @@ -2736,6 +2737,7 @@
"Workflows": "Flux de travail",
"Works": "Exécutions",
"Workspace": "Espace de travail",
"Workspace popover of actions": "Fenêtre contextuelle de l'espace de travail pour les actions",
"Workspaces": "Espaces de travail",
"Write": "Ecrire",
"Write a note": "Ecrire une note",
Expand Down
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,7 @@
"When enforcing 2FA authentication, all users will be asked to enable 2FA to be able to login in the platform.": "2要素認証を強制する場合、すべてのユーザーは、プラットフォームにログインできるように2要素認証を有効にするように求められます。",
"When you specified the platform organization, data without any organization restriction will be accessible only for users that are part of the platform one": "プラットフォーム組織を指定すると、組織の制限のないデータには、プラットフォーム 1 の一部であるユーザーのみがアクセスできます",
"Widget": "ウィジェット",
"Widget popover of actions": "アクションのウィジェットポップオーバー",
"Windows scheduled tasks": "Windowsのスケジュールされたタスク",
"Windows services": "Windowsサービス",
"WITH": "WITH",
Expand All @@ -2736,6 +2737,7 @@
"Workflows": "ワークフロー",
"Works": "作業",
"Workspace": "ワークスペース",
"Workspace popover of actions": "アクションのワークスペースポップオーバー",
"Workspaces": "ワークスペース",
"Write": "編集",
"Write a note": "ノートを書く",
Expand Down
2 changes: 2 additions & 0 deletions opencti-platform/opencti-front/lang/front/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,7 @@
"When enforcing 2FA authentication, all users will be asked to enable 2FA to be able to login in the platform.": "当强制执行双因素认证时,所有用户都将被要求启用双因素认证才能登录平台。",
"When you specified the platform organization, data without any organization restriction will be accessible only for users that are part of the platform one": "如果指定了平台组织,则只有属于平台一的用户才能访问不带任何组织限制的数据。",
"Widget": "组件",
"Widget popover of actions": "行动小部件弹出窗口",
"Windows scheduled tasks": "Windows计划任务",
"Windows services": "Windows服务",
"WITH": "",
Expand All @@ -2736,6 +2737,7 @@
"Workflows": "工作流程",
"Works": "工作",
"Workspace": "工作区",
"Workspace popover of actions": "工作区行动弹出窗口",
"Workspaces": "工作区",
"Write": "写入",
"Write a note": "写注释",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const AuthorizedMembersFieldListItem = ({
) ? (
<IconButton
color="primary"
aria-label="delete"
aria-label={t_i18n('Delete')}
onClick={() => onRemove?.()}
>
<Delete fontSize="small" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Select from '@mui/material/Select';
import FormControl from '@mui/material/FormControl';
import InputLabel from '@mui/material/InputLabel';
import Slide from '@mui/material/Slide';
import { AddOutlined, CloseOutlined, MoveToInboxOutlined, LockPersonOutlined, Delete } from '@mui/icons-material';
import { AddOutlined, CloseOutlined, Delete, LockPersonOutlined, MoveToInboxOutlined } from '@mui/icons-material';
import { DotsHorizontalCircleOutline } from 'mdi-material-ui';
import Button from '@mui/material/Button';
import Tooltip from '@mui/material/Tooltip';
Expand Down Expand Up @@ -240,6 +240,7 @@ const WorkspaceHeader = ({
onChange={(value) => handleDateChange('relativeDate', value)}
disabled={true}
variant="outlined"
aria-label="date"
>
<MenuItem value="none">{t_i18n('None')}</MenuItem>
<MenuItem value="days-1">{t_i18n('Last 24 hours')}</MenuItem>
Expand All @@ -258,6 +259,7 @@ const WorkspaceHeader = ({
clearable={true}
disableFuture={true}
disabled={true}
aria-label="start picker"
onChange={(value, context) => !context.validationError && handleDateChange('startDate', value)}
slotProps={{
textField: {
Expand All @@ -275,6 +277,7 @@ const WorkspaceHeader = ({
clearable={true}
disabled={true}
disableFuture={true}
aria-label="end picker"
onChange={(value, context) => !context.validationError && handleDateChange('endDate', value)}
slotProps={{
textField: {
Expand Down Expand Up @@ -397,7 +400,7 @@ const WorkspaceHeader = ({
<Tooltip title={t_i18n('Manage access restriction')}>
<ToggleButtonGroup size="small" color="warning" exclusive={true}>
<ToggleButton
aria-label="Label"
aria-label={t_i18n('Manage access restriction')}
onClick={handleOpenManageAccess}
size="small"
value="manage-access"
Expand Down Expand Up @@ -470,6 +473,7 @@ const WorkspaceHeader = ({
component={TextField}
variant="standard"
name="new_tag"
aria-label="tag field"
autoFocus={true}
placeholder={t_i18n('New tag')}
onChange={handleChangeNewTags}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ const WorkspacePopover = ({ workspace, paginationOptions }) => {
size="large"
style={{ marginTop: 3 }}
color="primary"
data-testid="popover"
aria-label={t_i18n('Workspace popover of actions')}
>
<MoreVert />
</IconButton>
<Menu anchorEl={anchorEl} open={Boolean(anchorEl)} onClose={handleClose}>
<Menu anchorEl={anchorEl} open={Boolean(anchorEl)} onClose={handleClose} aria-label="Workspace menu">
<MenuItem onClick={handleOpenEdit}>{t_i18n('Update')}</MenuItem>
{workspace.type === 'dashboard' && [
<MenuItem key="menu_duplicate" onClick={handleDashboardDuplication}>{t_i18n('Duplicate')}</MenuItem>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ const WidgetConfig = ({ workspace, widget, onComplete, closeMenu }) => {
<CardActionArea
onClick={() => handleSelectType(visualizationType.key)}
style={{ height: '100%' }}
aria-label={t_i18n(visualizationType.name)}
>
<CardContent>
{renderIcon(visualizationType.key)}
Expand Down Expand Up @@ -640,6 +641,7 @@ const WidgetConfig = ({ workspace, widget, onComplete, closeMenu }) => {
<CardActionArea
onClick={() => handleSelectPerspective('entities')}
style={{ height: '100%' }}
aria-label={t_i18n('Entities')}
>
<CardContent>
<DatabaseOutline style={{ fontSize: 40 }} color="primary"/>
Expand All @@ -665,6 +667,7 @@ const WidgetConfig = ({ workspace, widget, onComplete, closeMenu }) => {
<CardActionArea
onClick={() => handleSelectPerspective('relationships')}
style={{ height: '100%' }}
aria-label={t_i18n('Knowledge graph')}
>
<CardContent>
<FlaskOutline style={{ fontSize: 40 }} color="primary"/>
Expand Down Expand Up @@ -692,6 +695,7 @@ const WidgetConfig = ({ workspace, widget, onComplete, closeMenu }) => {
<CardActionArea
onClick={() => handleSelectPerspective('audits')}
style={{ height: '100%' }}
aria-label={t_i18n('Activity & history')}
>
<CardContent>
<LibraryBooksOutlined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const WidgetPopover = ({
size="small"
className="noDrag"
color="primary"
aria-label={t_i18n('Widget popover of actions')}
>
<MoreVert fontSize="small" />
</IconButton>
Expand Down

This file was deleted.

Loading

0 comments on commit 9039a3d

Please sign in to comment.