File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
fixtures/graphql/jcr/query Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change
1
+ query getStartedModulesVersion {
2
+ dashboard {
3
+ modules {
4
+ id
5
+ version
6
+ }
7
+ }
8
+ }
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @jahia/cypress" ,
3
- "version" : " 3.32 .0" ,
3
+ "version" : " 3.33 .0" ,
4
4
"scripts" : {
5
5
"build" : " tsc" ,
6
6
"lint" : " eslint src -c .eslintrc.json --ext .ts"
Original file line number Diff line number Diff line change @@ -6,3 +6,18 @@ export const getJahiaVersion = (): Cypress.Chainable => {
6
6
return result ?. data ?. admin . jahia . version ;
7
7
} ) ;
8
8
} ;
9
+
10
+ export const getStartedModulesVersion = ( ) : Cypress . Chainable => {
11
+ return cy . apollo ( {
12
+ fetchPolicy : 'no-cache' ,
13
+ queryFile : 'graphql/jcr/query/getStartedModulesVersion.graphql'
14
+ } ) . then ( result => {
15
+ return result ?. data ?. dashboard . modules ;
16
+ } ) ;
17
+ } ;
18
+
19
+ export const getStartedModuleVersion = ( moduleId : string ) : Cypress . Chainable => {
20
+ return getStartedModulesVersion ( ) . then ( modules => {
21
+ return modules . find ( module => module . id === moduleId ) ?. version ;
22
+ } ) ;
23
+ } ;
You can’t perform that action at this time.
0 commit comments