Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BACKLOG-23323 Reverting changes to the getJobsWithStatus query #99

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions fixtures/graphql/jcr/query/getJobsWithStatus.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ query getJobsWithStatus{
jahia {
scheduler{
jobs {
nodes {
siteKey
group
jobStatus
}
siteKey
group
jobStatus
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jahia/cypress",
"version": "3.34.0",
"version": "3.35.0",
"scripts": {
"build": "tsc",
"lint": "eslint src -c .eslintrc.json --ext .ts"
Expand Down
38 changes: 36 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,18 @@ type GqlBackgroundJobEdge {
node: GqlBackgroundJob
}

"Channel information"
type GqlChannel {
"Channel label (not localized)"
displayName: String
"Return true if channel is visible, otherwise false"
isVisible: Boolean
"Channel name/identifier"
name: String
"Return variants for this channel, if available"
variants: [GqlVariant]
}

"Condition for override item"
type GqlCondition {
"Item will apply only on this nodetype"
Expand Down Expand Up @@ -1365,6 +1377,8 @@ type GqlHealthCheck {

"jContent API"
type GqlJContent {
"Returns all available channels"
channels: [GqlChannel]
"Returns html with marked differences"
diffHtml(
"New html"
Expand Down Expand Up @@ -1654,8 +1668,10 @@ type GqlPublicationInfo {

"Scheduler object which allows to access to background jobs"
type GqlScheduler {
"List of active jobs"
jobs(
"List of active jobs (deprecated)"
jobs: [GqlBackgroundJob] @deprecated(reason: "Use paginatedJobs instead")
"List of active jobs (paginated)"
paginatedJobs(
"fetching only nodes after this node (exclusive)"
after: String,
"fetching only nodes before this node (exclusive)"
Expand Down Expand Up @@ -1685,6 +1701,24 @@ type GqlScope {
name: String
}

"Variant information for a given channel"
type GqlVariant {
"Variant display name/label (not localized)"
displayName: String
"Variant dimension (width x height) if available"
imageSize: GqlVariantDimension
"Variant name/identifier"
name: String
}

"Represents dimensions (width, height) of a variant"
type GqlVariantDimension {
"Variant height"
height: String
"Variant width"
width: String
}

type GqlWorkflowEvent {
"Number of tasks for current user"
activeWorkflowTaskCountForUser: Int
Expand Down
2 changes: 1 addition & 1 deletion src/utils/PublicationAndWorkflowHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const waitAllJobsFinished = (errorMessage?: string, timeout = 60000): voi
queryFile: 'graphql/jcr/query/getJobsWithStatus.graphql'
})
.then(response => {
const jobs = response?.data?.admin?.jahia?.scheduler?.jobs.nodes;
const jobs = response?.data?.admin?.jahia?.scheduler?.jobs;
const publicationJobs = jobs.filter(job => job.group === 'PublicationJob');
const hasActivePublicationJobs = publicationJobs.some(job => job.jobStatus === 'EXECUTING');
return !hasActivePublicationJobs;
Expand Down
Loading