File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
pageComponents/DatabasePage
ForPulls/PullActions/Merge Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
import NotDoltWrapper from "@components/util/NotDoltWrapper" ;
2
2
import { Tooltip } from "@dolthub/react-components" ;
3
+ import useDatabaseDetails from "@hooks/useDatabaseDetails" ;
3
4
import { OptionalRefParams } from "@lib/params" ;
4
5
import NavItem from "./Item" ;
5
6
import Wrapper from "./Wrapper" ;
@@ -24,11 +25,18 @@ export default function DatabaseNav(props: Props) {
24
25
}
25
26
26
27
function Inner ( props : Props ) {
28
+ const { isDolt, isPostgres } = useDatabaseDetails ( ) ;
29
+
27
30
return (
28
31
< div data-cy = "db-page-header-nav" className = { css . headerNav } >
29
32
< Tooltip id = "disabled-database-nav-item" />
30
33
< ul className = { css . tabs } >
31
34
{ tabs . map ( ( tab , i ) => {
35
+ // Hide Tests tab for doltgres databases for now
36
+ if ( tab === "Tests" && isDolt && isPostgres ) {
37
+ return null ;
38
+ }
39
+
32
40
const item = < NavItem { ...props } key = { tab } name = { tab } i = { i } /> ;
33
41
if ( tab === "Database" ) {
34
42
return item ;
Original file line number Diff line number Diff line change @@ -46,12 +46,13 @@ export default function Merge(props: Props) {
46
46
mergeState,
47
47
resolveState,
48
48
} = useMergeButton ( props . params ) ;
49
+ const { isPostgres } = useDatabaseDetails ( ) ;
49
50
const red = hasConflicts ;
50
51
51
52
return (
52
53
< div className = { css . wrapper } >
53
54
< div className = { css . mergeDetails } >
54
- < TestResults params = { props . params } />
55
+ { ! isPostgres && < TestResults params = { props . params } /> }
55
56
< div className = { css . outer } >
56
57
< span className = { cx ( css . picContainer , { [ css . redIcon ] : red } ) } >
57
58
< FiGitPullRequest />
Original file line number Diff line number Diff line change @@ -4,13 +4,15 @@ import { tests as testsUrl } from "@lib/urls";
4
4
import ForDefaultBranch from "../ForDefaultBranch" ;
5
5
import TestList from "./TestList" ;
6
6
import { TestProvider } from "./context" ;
7
+ import useDatabaseDetails from "@hooks/useDatabaseDetails" ;
7
8
8
9
type Props = {
9
10
params : RefParams ;
10
11
} ;
11
12
12
13
export default function ForTests ( props : Props ) : JSX . Element {
13
- const feature = "Viewing tests" ;
14
+ const { isPostgres } = useDatabaseDetails ( ) ;
15
+
14
16
return (
15
17
< ForDefaultBranch
16
18
params = { props . params }
@@ -19,10 +21,10 @@ export default function ForTests(props: Props): JSX.Element {
19
21
title = "tests"
20
22
routeRefChangeTo = { testsUrl }
21
23
>
22
- < NotDoltWrapper showNotDoltMsg feature = { feature } bigMsg >
23
- < TestProvider params = { props . params } >
24
+ < NotDoltWrapper showNotDoltMsg feature = "Viewing Tests" bigMsg >
25
+ { ! isPostgres ? < TestProvider params = { props . params } >
24
26
< TestList params = { props . params } />
25
- </ TestProvider >
27
+ </ TestProvider > : < div /> }
26
28
</ NotDoltWrapper >
27
29
</ ForDefaultBranch >
28
30
) ;
You can’t perform that action at this time.
0 commit comments