Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
frontend
Merge requests
!213
Plugins should always receive reaction from new api
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Plugins should always receive reaction from new api
plugins-should-always-receive-reaction-from-new-api
into
development
Overview
0
Commits
2
Pipelines
2
Changes
9
Merged
Piotr Gawron
requested to merge
plugins-should-always-receive-reaction-from-new-api
into
development
8 months ago
Overview
0
Commits
2
Pipelines
2
Changes
9
Expand
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
6d3c079b
2 commits,
8 months ago
9 files
+
98
−
102
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
src/components/FunctionalArea/Modal/LoggedInMenuModal/LoggedInMenuModal.component.test.tsx
+
0
−
20
Options
@@ -3,11 +3,9 @@ import {
InitialStoreState
,
getReduxStoreWithActionsListener
,
}
from
'
@/utils/testing/getReduxStoreActionsListener
'
;
import
mockRouter
from
'
next-router-mock
'
;
import
{
fireEvent
,
render
,
screen
}
from
'
@testing-library/react
'
;
import
{
MockStoreEnhanced
}
from
'
redux-mock-store
'
;
import
{
FIRST_ARRAY_ELEMENT
}
from
'
@/constants/common
'
;
import
{
projectFixture
}
from
'
@/models/fixtures/projectFixture
'
;
import
{
LoggedInMenuModal
}
from
'
./LoggedInMenuModal.component
'
;
const
renderComponent
=
(
@@ -41,22 +39,4 @@ describe('LoggedInMenuModal component', () => {
const
actions
=
store
.
getActions
();
expect
(
actions
[
FIRST_ARRAY_ELEMENT
].
type
).
toBe
(
'
modal/closeModal
'
);
});
it
(
'
redirects to the admin panel when "Go to the admin panel" button is clicked
'
,
()
=>
{
const
routerPushSpy
=
jest
.
spyOn
(
mockRouter
,
'
push
'
);
renderComponent
({
project
:
{
data
:
projectFixture
,
loading
:
'
succeeded
'
,
error
:
{
message
:
''
,
name
:
''
},
projectId
:
''
,
},
});
fireEvent
.
click
(
screen
.
getByText
(
'
Go to the admin panel
'
));
expect
(
routerPushSpy
).
toHaveBeenCalledWith
(
`https://lux1.atcomp.pl/minerva/admin.xhtml?id=pdmap_appu_test`
,
);
});
});
Loading