File tree Expand file tree Collapse file tree 6 files changed +17
-17
lines changed
tests/integration/tests/kyma-namespace Expand file tree Collapse file tree 6 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 11import { Button } from '@ui5/webcomponents-react' ;
22import { useTranslation } from 'react-i18next' ;
3- import { useRecoilState } from 'recoil ' ;
3+ import { useAtom } from 'jotai ' ;
44import { isSidebarCondensedState } from 'state/preferences/isSidebarCondensedAtom' ;
55
66export function SidebarSwitcher ( props : any ) {
77 const { t } = useTranslation ( ) ;
8- const [ isSidebarCondensed , setSidebarCondensed ] = useRecoilState (
8+ const [ isSidebarCondensed , setSidebarCondensed ] = useAtom (
99 isSidebarCondensedState ,
1010 ) ;
1111
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { useTranslation } from 'react-i18next' ;
3- import { SetterOrUpdater , useRecoilValue } from 'recoil' ;
3+ import { SetterOrUpdater } from 'recoil' ;
4+ import { useAtomValue } from 'jotai' ;
5+
46import { Category } from 'state/navigation/categories' ;
57import {
68 SideNavigationItem ,
@@ -32,7 +34,7 @@ export function CategoryItem({
3234 const { t } = useTranslation ( ) ;
3335 const categoryName = t ( category . label , { defaultValue : category . label } ) ;
3436 const expanded = expandedCategories . includes ( category . key ) ;
35- const isSidebarCondensed = useRecoilValue ( isSidebarCondensedState ) ;
37+ const isSidebarCondensed = useAtomValue ( isSidebarCondensedState ) ;
3638
3739 const handleAddExpandedCategory = (
3840 e : Ui5CustomEvent <
Original file line number Diff line number Diff line change 1+ import { useAtomValue , useSetAtom } from 'jotai' ;
12import { useRecoilState , useRecoilValue } from 'recoil' ;
2- import { useSetAtom } from 'jotai' ;
33import {
44 SideNavigation ,
55 SideNavigationItem ,
@@ -24,7 +24,7 @@ import { useFormNavigation } from 'shared/hooks/useFormNavigation';
2424
2525export function SidebarNavigation ( ) {
2626 const navigationNodes = useRecoilValue ( sidebarNavigationNodesSelector ) ;
27- const isSidebarCondensed = useRecoilValue ( isSidebarCondensedState ) ;
27+ const isSidebarCondensed = useAtomValue ( isSidebarCondensedState ) ;
2828 const namespace = useRecoilValue ( activeNamespaceIdState ) ;
2929 const { t } = useTranslation ( ) ;
3030 const navigate = useNavigate ( ) ;
Original file line number Diff line number Diff line change 11import { useState , useEffect } from 'react' ;
2- import { useSetRecoilState } from 'recoil ' ;
2+ import { useSetAtom } from 'jotai ' ;
33import { isSidebarCondensedState } from 'state/preferences/isSidebarCondensedAtom' ;
44
55function getWindowDimensions ( ) {
@@ -26,7 +26,7 @@ function useWindowDimensions() {
2626
2727export default function useSidebarCondensed ( ) {
2828 const width = useWindowDimensions ( ) ;
29- const setSidebarCondensed = useSetRecoilState ( isSidebarCondensedState ) ;
29+ const setSidebarCondensed = useSetAtom ( isSidebarCondensedState ) ;
3030
3131 useEffect ( ( ) => {
3232 if ( width <= 900 ) setSidebarCondensed ( true ) ;
Original file line number Diff line number Diff line change 1- import { atom , RecoilState } from 'recoil' ;
2-
3- type IsSidebarCondensed = boolean ;
1+ import { atom } from 'jotai' ;
42
53const DEFAULT_IS_SIDEBAR_CONDENSED = false ;
64
7- export const isSidebarCondensedState : RecoilState < IsSidebarCondensed > = atom <
8- IsSidebarCondensed
9- > ( {
10- key : 'isSidebarCondensedState' ,
11- default : DEFAULT_IS_SIDEBAR_CONDENSED ,
12- } ) ;
5+ export const isSidebarCondensedState = atom < boolean > (
6+ DEFAULT_IS_SIDEBAR_CONDENSED ,
7+ ) ;
8+ isSidebarCondensedState . debugLabel = 'isSidebarCondensedState' ;
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ context('Clean up Namespace', () => {
1212 . contains ( 'Namespaces' )
1313 . click ( ) ;
1414
15+ cy . wait ( 1000 ) ;
16+
1517 cy . deleteFromGenericList ( 'Namespace' , Cypress . env ( 'NAMESPACE_NAME' ) , {
1618 clearSearch : false ,
1719 checkIfResourceIsRemoved : false ,
You can’t perform that action at this time.
0 commit comments