Skip to content

Commit

Permalink
Slugify Collectives and Pages (try fix cypress)
Browse files Browse the repository at this point in the history
Signed-off-by: Kostiantyn Miakshyn <[email protected]>
  • Loading branch information
Koc committed Jan 4, 2025
1 parent 893a5c8 commit 3f6dcdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cypress/e2e/pages-links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
*/

const baseUrl = Cypress.env('baseUrl')
const sourceUrl = new URL(`${baseUrl}/index.php/apps/collectives/Link%20Testing/Link%20Source`)
let imageId, pdfId, textId
let imageId, pdfId, textId, sourceUrl
let anotherCollectiveFirstPageId, linkTargetPageId

describe('Page link handling', function() {
Expand All @@ -21,7 +20,9 @@ describe('Page link handling', function() {
.seedPage('Link Target', '', 'Readme.md').then(({ pageId }) => {
linkTargetPageId = pageId
})
.seedPage('Link Source', '', 'Readme.md')
.seedPage('Link Source', '', 'Readme.md').then(({ collectiveId, pageId }) => {
sourceUrl = new URL(`${baseUrl}/index.php/apps/collectives/Link-Testing-${collectiveId}/page-${pageId}-Link-Source`)
})
cy.seedPageContent('Link%20Testing/Link%20Target.md', 'Some content')
cy.uploadFile('test.md', 'text/markdown').then((id) => {
textId = id
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ Cypress.Commands.add('seedPage',
)
})
.its('data.data.id')
.then(pageId => ({ ...subject, pageId }))
.then(pageId => ({ ...subject, collectiveId: collectiveContext(subject).collectiveId, pageId }))
})

/**
Expand Down

0 comments on commit 3f6dcdc

Please sign in to comment.