Skip to content

Commit

Permalink
BACKLOG-23347: Show SEO section only for certain nodetypes (#256)
Browse files Browse the repository at this point in the history
* BACKLOG-23347: Show SEO section only for certain nodetypes

* BACKLOG-23500: Add ordering

* Use default lts node version for static-analysis workflow
  • Loading branch information
gflores-jahia authored Jan 9, 2025
1 parent 345f77e commit adb4e87
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/on-code-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- uses: Jahia/jahia-modules-action/static-analysis@v2
with:
skip_lint_modules: true
node_version: 14
auditci_level: critical

build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"sections": [
{
"name": "seo",
"hide": false,
"fieldSets": [
{
"name": "htmlHead",
"labelKey": "site-settings-seo:seo.htmlHeadSection.label",
"rank": 0.1,
"fields": [
{
"name": "jcr:description",
Expand All @@ -30,6 +32,7 @@
},
{
"name": "jmix:seoHtmlHead",
"rank": 0.2,
"isAlwaysActivated": true,
"alwaysPresent": true,
"hide": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"sections": [
{
"name": "seo",
"hide": false,
"fieldSets": [
{
"name": "htmlHead",
"labelKey": "site-settings-seo:seo.htmlHeadSection.label",
"rank": 0.1,
"fields": [
{
"name": "jcr:description",
Expand All @@ -30,6 +32,7 @@
},
{
"name": "jmix:seoHtmlHead",
"rank": 0.2,
"isAlwaysActivated": true,
"alwaysPresent": true,
"hide": true
Expand Down
6 changes: 4 additions & 2 deletions tests/cypress/e2e/seoOverrides/definitions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ describe('New SEO field definition tests', () => {
})
})

it('should not have new SEO fields for other types', function () {
JContent.visit(siteKey, 'en', 'content-folders/contents').createContent('Rich text').openSection('seo')
it('should not have SEO section and new SEO fields for other types', function () {
JContent.visit(siteKey, 'en', 'content-folders/contents').createContent('Rich text')
cy.get(`[data-sel-content-editor-fields-group="seo"]`).should('not.exist', { timeout: 10000 })

const assertFieldNotExist = (contentType) => {
cy.get(`[data-sel-content-editor-field="${contentType}"]`).should('not.exist', { timeout: 10000 })
}
Expand Down

0 comments on commit adb4e87

Please sign in to comment.