diff --git a/.github/actions/tests.sh b/.github/actions/tests.sh
index 2482793..1dd05e7 100755
--- a/.github/actions/tests.sh
+++ b/.github/actions/tests.sh
@@ -2,8 +2,4 @@
set -e
-npx cypress run --spec "cypress/tests/data/10-Installation.spec.js,cypress/tests/data/20-CreateContext.spec.js"
-
-npx cypress run --headless --browser chrome --config '{"specPattern":["plugins/generic/customHeader/cypress/tests/functional/*.cy.js"]}'
-
-
+npx cypress run --config specPattern=plugins/generic/customHeader/cypress/tests/functional
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b7589e8..71aca35 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,4 +1,4 @@
-on: [push]
+on: [push, pull_request]
name: customHeader
jobs:
customHeader:
@@ -43,12 +43,12 @@ jobs:
- application: ops
php-version: 8.2
database: pgsql
-
name: customHeader
steps:
- uses: pkp/pkp-github-actions@v1
with:
- node_version: 20
- branch: main
- repository: pkp
- plugin: true
+ node_version: 20
+ branch: main
+ repository: pkp
+ plugin: true
+ dataset_inject: true
diff --git a/cypress/tests/functional/CustomHeader.cy.js b/cypress/tests/functional/CustomHeader.cy.js
index 1538dd4..12ad888 100644
--- a/cypress/tests/functional/CustomHeader.cy.js
+++ b/cypress/tests/functional/CustomHeader.cy.js
@@ -11,16 +11,18 @@ describe('Custom Header plugin tests', function() {
it('Creates and exercises a custom header', function() {
cy.login('admin', 'admin', 'publicknowledge');
- cy.get('.app__nav a').contains('Website').click();
+ cy.get('nav').contains('Settings').click();
+ // Ensure submenu item click despite animation
+ cy.get('nav').contains('Website').click({ force: true });
cy.get('button[id="plugins-button"]').click();
// Find and enable the plugin
cy.get('input[id^="select-cell-customheaderplugin-enabled"]').click();
cy.get('div:contains(\'The plugin "Custom Header Plugin" has been enabled.\')');
- cy.waitJQuery();
+ cy.reload();
- cy.get('tr[id*="customheaderplugin"] a.show_extras').click();
- cy.get('a[id*="customheaderplugin-settings"]').click();
+ cy.get('tr[id="component-grid-settings-plugins-settingsplugingrid-category-generic-row-customheaderplugin"] a.show_extras').click();
+ cy.get('a[id^="component-grid-settings-plugins-settingsplugingrid-category-generic-row-customheaderplugin-settings-button"').click();
cy.waitJQuery(2000); // Wait for form to settle
cy.get('textarea[id^="headerContent-"]').type('', {delay: 0});
cy.get('textarea[id^="footerContent-"]').type('', {delay: 0});