File tree Expand file tree Collapse file tree 7 files changed +22
-17
lines changed
data-browser/src/views/OntologyPage Expand file tree Collapse file tree 7 files changed +22
-17
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ export function ClassCardRead({ subject }: ClassCardReadProps): JSX.Element {
22
22
const [ recommends ] = useArray ( resource , core . properties . recommends ) ;
23
23
24
24
return (
25
- < TargetableCard subject = { subject } >
25
+ < TargetableCard
26
+ subject = { subject }
27
+ testId = { `class-card-read-${ resource . title } ` }
28
+ >
26
29
< Column >
27
30
< Row center justify = 'space-between' >
28
31
< StyledH3 >
Original file line number Diff line number Diff line change @@ -51,10 +51,7 @@ export function ClassCardWrite({ subject }: ClassCardWriteProps): JSX.Element {
51
51
} ;
52
52
53
53
return (
54
- < StyledCard
55
- subject = { subject }
56
- data-testid = { `class-card-write-${ resource . title } ` }
57
- >
54
+ < StyledCard subject = { subject } testId = { `class-card-write-${ resource . title } ` } >
58
55
< Column >
59
56
< Row center justify = 'space-between' >
60
57
< TitleWrapper >
Original file line number Diff line number Diff line change @@ -7,18 +7,21 @@ import ResourceCard from '../Card/ResourceCard';
7
7
type TargetableCardProps = {
8
8
subject : string ;
9
9
className ?: string ;
10
+ testId : string ;
10
11
} ;
11
12
12
13
export const TargetableCard = ( {
13
14
subject,
14
15
className,
16
+ testId,
15
17
children,
16
18
} : React . PropsWithChildren < TargetableCardProps > ) => {
17
19
return (
18
20
< StyledCard
19
21
id = { toAnchorId ( subject ?? '' ) }
20
22
about = { subject }
21
23
className = { className }
24
+ data-testid = { testId }
22
25
>
23
26
{ children }
24
27
</ StyledCard >
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -10,18 +10,20 @@ export const INITIAL_TEST = false;
10
10
export const DEMO_INVITE_NAME = 'document demo invite' ;
11
11
12
12
export const testFilePath = ( filename : string ) => {
13
- const processPath = process . cwd ( ) ;
14
-
15
- // In the CI, the tests dir is missing for some reason?
16
- if ( processPath . endsWith ( 'tests' ) ) {
17
- return `${ processPath } /${ filename } ` ;
18
- } else if ( processPath . endsWith ( 'e2e' ) ) {
19
- return `${ processPath } /tests/${ filename } ` ;
20
- } else if ( processPath . endsWith ( 'browser' ) ) {
21
- return `${ processPath } /e2e/tests/${ filename } ` ;
22
- } else {
23
- return `${ processPath } /browser/e2e/tests/${ filename } ` ;
24
- }
13
+ const fixturesFolder = __dirname + '/fixtures' ;
14
+
15
+ return `${ fixturesFolder } /${ filename } ` ;
16
+
17
+ // const processPath = process.cwd();
18
+ // if (processPath.endsWith('tests')) {
19
+ // return `${processPath}/fixtures/${filename}`;
20
+ // } else if (processPath.endsWith('e2e')) {
21
+ // return `${processPath}/tests/fixtures/${filename}`;
22
+ // } else if (processPath.endsWith('browser')) {
23
+ // return `${processPath}/e2e/tests/fixtures/${filename}`;
24
+ // } else {
25
+ // return `${processPath}/browser/e2e/tests/fixtures/${filename}`;
26
+ // }
25
27
} ;
26
28
27
29
export const timestamp = ( ) => new Date ( ) . toLocaleTimeString ( ) ;
You can’t perform that action at this time.
0 commit comments