Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
01f8b9e
intermediate commit to upgrade to latest coko libs
yannisbarlas Apr 30, 2026
b24a5bf
feat(client): drop react-adopt
yannisbarlas May 4, 2026
6d3761a
fix client lint
yannisbarlas May 4, 2026
d5dc2b7
fix all eslint errors
yannisbarlas May 4, 2026
83660be
chore(client): make all react files jsx
yannisbarlas May 4, 2026
876c362
chore(client): get the client to open
yannisbarlas May 4, 2026
d384e3d
fix(client): get the client to open
yannisbarlas May 5, 2026
c6a5b87
fix(client): fix issues arising from defaultProps being deprecated
yannisbarlas May 5, 2026
135757e
fix(api): fix reading useSandboxOrcid from config
yannisbarlas May 11, 2026
b2d00e6
chore(client): replace dead lib react-beautiful-dnd with dnd-kit
yannisbarlas May 11, 2026
10fc0bd
fix(api): fix profile folder assets not loading in dev
yannisbarlas May 11, 2026
47ca508
fix(client): fix props being accidentally passed to the dom
yannisbarlas May 11, 2026
a8419bd
fix(client): make cms pages editor work
yannisbarlas May 11, 2026
59a9dbf
fix(client): fix react feather icons
yannisbarlas May 11, 2026
8338487
fix(client): fix reports page
yannisbarlas May 11, 2026
2739142
chore(client): drop unused dependencies
yannisbarlas May 11, 2026
469f704
chore(client): upgrade wax to support react 19
yannisbarlas May 13, 2026
f7dc159
fix(api): fix article template page
yannisbarlas May 13, 2026
a8f54fa
fix(api): fix new submission document uploading
yannisbarlas May 13, 2026
366e340
fix(client): make edit collection button work
yannisbarlas May 13, 2026
2d9ec5a
build(*): stick to pg 16 in development
yannisbarlas May 18, 2026
2b6a7d6
chore(*): bump coko server version
yannisbarlas May 18, 2026
7efd589
chore(*): bump coko server version
yannisbarlas May 18, 2026
8b6fea3
chore(*): bump coko server version
yannisbarlas May 18, 2026
62f7029
fix(*): do not throw if no favicon found
yannisbarlas May 19, 2026
e16ba7e
fix(*): stop fetching current user on every click
yannisbarlas May 19, 2026
662a3f2
fix(client): fix recharts size warning
yannisbarlas May 19, 2026
f258578
fix(ui): fix ui errors
yannisbarlas May 19, 2026
f37ef69
fix(api): fix logs incorrectly marked as errors
yannisbarlas May 19, 2026
ad587ca
chore(api): make sure all gql queries are named
yannisbarlas May 19, 2026
6bc9904
fix(ui): fix ui errors in chat sidebar
yannisbarlas May 19, 2026
240e0a2
chore(client): more named queries
yannisbarlas May 19, 2026
ebee6ff
fix(ui): fix wax losing focus and work on tests
yannisbarlas May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .commitlintrc.js

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

13 changes: 0 additions & 13 deletions .eslintrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ packages/server/scripts/local
!**/.yarn/releases
!**/.yarn/sdks
!**/.yarn/versions

.claude
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

3 changes: 0 additions & 3 deletions .lintstagedrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { prettier } from '@coko/lint'

export default prettier
16 changes: 0 additions & 16 deletions .renovaterc

This file was deleted.

1 change: 0 additions & 1 deletion .stylelintignore

This file was deleted.

17 changes: 0 additions & 17 deletions .stylelintrc.js

This file was deleted.

17 changes: 17 additions & 0 deletions .stylelintrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { stylelint } from '@coko/lint'

// stylelint.ignoreFiles = [
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/JatsSideMenuToolGroupService/JatsSideMenu.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/KotahiBlockDropDownToolGroupService/KotahiBlockDropDown.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/AnystyleService/AnyStyleToolGroupService/AnyStyle.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/JatsSideMenuToolGroupService/menugroups/AcknowledgementsGroup.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/JatsSideMenuToolGroupService/menugroups/AppendixGroup.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/JatsSideMenuToolGroupService/menugroups/CitationGroup.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/JatsSideMenuToolGroupService/menugroups/FrontMatterGroup.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/JatsSideMenuToolGroupService/menugroups/FundingGroup.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/JatsSideMenuToolGroupService/menugroups/GlossaryGroup.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/JatsSideMenuToolGroupService/menugroups/KeywordGroup.js',
// 'packages/client/app/components/wax-collab/src/CustomWaxToolGroups/ListsService/ListToolGroupService/Lists.js',
// ]

export default stylelint
9 changes: 0 additions & 9 deletions babel.config.js

This file was deleted.

23 changes: 1 addition & 22 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,16 @@
const { defineConfig } = require('cypress')
const path = require('path')

require('dotenv').config({ path: path.join(__dirname, './.env') })

const serverUrl = process.env.SERVER_URL
const serverUrl = process.env.SERVER_URL || 'http://localhost:3000'
const e2eApiUrl = `${serverUrl}/api/e2e`
const restoreUrl = `${e2eApiUrl}/restore`
const seedUrl = `${e2eApiUrl}/seed`
const createTokenUrl = `${e2eApiUrl}/createToken`
const seedFormsUrl = `${e2eApiUrl}/seedForms`

module.exports = defineConfig({
defaultCommandTimeout: 20000,
viewportWidth: 1200,
e2e: {
baseUrl: 'http://localhost:4000',

// 🛠 Correct place for on() and task handlers
// setupNodeEvents(on, config) {
// on('task', {
// restore(name) {
// if (name === 'email_notification') {
// console.log('Restoring email_notification test data...')
// // Your custom logic here
// return null // or a promise, or true/false
// }

// return null
// },
// })

// return config
// },
},
screenshotOnRunFailure: false,
video: false,
Expand Down
5 changes: 0 additions & 5 deletions cypress/.eslintrc.js

This file was deleted.

5 changes: 3 additions & 2 deletions cypress/e2e/a-journal/000-login_spec.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable jest/expect-expect */
/* eslint-disable promise/always-return */

import { DashboardPage } from '../../page-object/dashboard-page'
import { Menu } from '../../page-object/page-component/menu'
import { dashboard } from '../../support/routes'
Expand All @@ -12,7 +13,7 @@ describe('Login test', () => {
cy.request('POST', `${seedUrl}/new_user`)

// login as admin and validate admin is logged in
// eslint-disable-next-line jest/valid-expect-in-promise

cy.fixture('role_names').then(name => {
cy.login(name.role.admin, dashboard)
// enter email
Expand Down
5 changes: 2 additions & 3 deletions cypress/e2e/a-journal/001-docx_submission_spec.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/* eslint-disable jest/no-commented-out-tests */
/* eslint-disable jest/expect-expect */
/* eslint-disable promise/always-return */

import { DashboardPage } from '../../page-object/dashboard-page'
import { SubmissionFormPage } from '../../page-object/submission-form-page'
import { dashboard } from '../../support/routes'

describe('Create a new submission', () => {
// eslint-disable-next-line jest/no-disabled-tests
before(() => {
const restoreUrl = Cypress.config('restoreUrl')
cy.request('POST', `${restoreUrl}/commons.bootstrap`)
Expand All @@ -19,6 +17,7 @@ describe('Create a new submission', () => {
})

DashboardPage.clickSubmissionButton() // Click on new submission
cy.url().should('include', 'newSubmission')
})

it('can upload a manuscript and add a title', () => {
Expand Down
15 changes: 3 additions & 12 deletions cypress/e2e/a-journal/002-assign_reviewers_spec.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable jest/expect-expect */
/* eslint-disable promise/always-return */

import { seniorEditor } from '../../fixtures/role_names'
import { ControlPage } from '../../page-object/control-page'
import { DashboardPage } from '../../page-object/dashboard-page'
import { Menu } from '../../page-object/page-component/menu'
Expand All @@ -16,15 +15,7 @@ describe('Editor assigning reviewers', () => {
})

it('can assign 6 reviewers', () => {
// login as seniorEditor
cy.login(seniorEditor, dashboard)
cy.url().should('eq', `${Cypress.config().baseUrl}/journal/dashboard`)
cy.reload()
cy.awaitDisappearSpinner()

// eslint-disable-next-line jest/valid-expect-in-promise
cy.fixture('role_names').then(name => {
// login as seniorEditor
cy.login(name.role.seniorEditor, dashboard)
cy.reload()
DashboardPage.clickDashboardTab(2)
Expand All @@ -33,7 +24,7 @@ describe('Editor assigning reviewers', () => {

// Invite all the reviewers
cy.reload()
name.role.reviewers.forEach((reviewer, index) => {
name.role.reviewers.forEach(reviewer => {
ControlPage.clickInviteReviewerDropdown()
ControlPage.inviteReviewer(reviewer)
// Ensure modal closes before continuing
Expand All @@ -49,6 +40,6 @@ describe('Editor assigning reviewers', () => {

// Go to dashboard and verify number of invited reviewer
Menu.clickDashboard()
cy.get('.ReviewStatusDonut__CenterLabel-sc-76zxfe-1').contains('6')
cy.getByDataTestId('donut-center-label').contains('6')
})
})
15 changes: 6 additions & 9 deletions cypress/e2e/a-journal/003-review_spec.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable jest/valid-expect-in-promise */
/* eslint-disable jest/expect-expect */
/* eslint-disable promise/always-return */

import { DashboardPage } from '../../page-object/dashboard-page'
import { ReviewPage } from '../../page-object/review-page'
import { dashboard } from '../../support/routes'
Expand Down Expand Up @@ -63,14 +63,14 @@ describe('Completing reviews', () => {
cy.get('[data-testid="control-panel-team"]').click()
cy.awaitDisappearSpinner()
cy.get(
'[class*=KanbanBoard__Kanban] > :nth-child(1) > [class*=KanbanBoard__CardsWrapper] > [class*=KanbanCard]',
'[data-testid=kanban] > :nth-child(1) > [data-testid=kanban-cards-wrapper] > [data-testid=kanban-card]',
).should('contain', name.role.reviewers[5])
// ControlPage.getInvitedReviewer
cy.get(
'[class*=KanbanBoard__Kanban] > :nth-child(2) > [class*=KanbanBoard__CardsWrapper] > [class*=KanbanCard]',
'[data-testid=kanban] > :nth-child(2) > [data-testid=kanban-cards-wrapper] > [data-testid=kanban-card]',
).should('contain', name.role.reviewers[3])
cy.get(
'[class*=KanbanBoard__Kanban] > :nth-child(4) > [class*=KanbanBoard__CardsWrapper] > [class*=KanbanCard]',
'[data-testid=kanban] > :nth-child(4) > [data-testid=kanban-cards-wrapper] > [data-testid=kanban-card]',
).should('contain', name.role.reviewers[1])

cy.contains('See Declined (1)').should('exist')
Expand All @@ -96,7 +96,7 @@ const doReview = (name, reviewData) => {
DashboardPage.clickDoReview()
cy.awaitDisappearSpinner()
cy.contains('Type of Research Object').should('exist')
cy.get('[class*=TabsContainer]').contains('Review').click()
cy.get('[data-testid=tab-container]').contains('Review').click()
ReviewPage.getReviewCommentField().focus().type('comment', { delay: 200 })
ReviewPage.getReviewCommentField().fillInput(reviewData.comment)
if (reviewData.radioButton === 'accept')
Expand All @@ -106,9 +106,6 @@ const doReview = (name, reviewData) => {
if (reviewData.radioButton === 'revise')
ReviewPage.clickReviseRadioButton()

// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000)

// Submit the review
ReviewPage.clickSubmitButton()
cy.contains('Confirm your review').should('exist')
Expand Down
24 changes: 13 additions & 11 deletions cypress/e2e/a-journal/004-assigning_editor_spec.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable no-unused-vars */
/* eslint-disable jest/valid-expect-in-promise */
/* eslint-disable jest/expect-expect */
/* eslint-disable promise/always-return */

import { Menu } from '../../page-object/page-component/menu'
import { ManuscriptsPage } from '../../page-object/manuscripts-page'
import { ControlPage } from '../../page-object/control-page'
Expand All @@ -16,17 +15,12 @@ describe('Assigning editors and decision reject', () => {

cy.fixture('submission_form_data').then(data => {
cy.fixture('role_names').then(name => {
// login as admin
cy.login(name.role.admin, dashboard)

// select Control on the Manuscripts page
Menu.clickManuscripts()

ManuscriptsPage.selectOptionWithText('Control')
cy.reload()
// added a reload here because tests were failing on an unhandled promise.

// assign seniorEditor
ControlPage.clickAssignSeniorEditorDropdown()
ControlPage.selectDropdownOptionByName(name.role.seniorEditor)

Expand All @@ -37,15 +31,23 @@ describe('Assigning editors and decision reject', () => {
ControlPage.selectDropdownOptionByName(name.role.admin)

// reject submission
cy.log('Admin rejects a submission.')
ControlPage.clickDecisionTab(1)
ControlPage.clickDecisionTab()

cy.intercept('POST', '/graphql').as('autoSaveEditor')
ControlPage.fillInDecision(data.rejectedDecision)
cy.wait('@autoSaveEditor')

cy.intercept('POST', '/graphql').as('autoSaveReject')
ControlPage.clickReject()
cy.wait('@autoSaveReject')

/* eslint-disable-next-line cypress/no-unnecessary-waiting */
cy.wait(1000)
ControlPage.clickSubmit()
ControlPage.checkSvgExists()
})
})

cy.contains('Dashboard').click()
// cy.contains('Dashboard').click()
})
})
Loading
Loading