-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add/context-module
* main: Ensure that the URL has a trailing slash. This ensures that the PHP_URL_PATH is always set, which prevents the str_replace() call from outputting "Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated" add brand plugin test workflow add brand plugin test workflow fix autofixable lint issues in test file add .nvmrc as v16
- Loading branch information
Showing
4 changed files
with
121 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build and Test Module Updates in Brand Plugins | ||
on: | ||
pull_request: | ||
types: [ opened, reopened, ready_for_review, synchronize ] | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
setup: | ||
name: Setup | ||
runs-on: ubuntu-latest | ||
outputs: | ||
branch: ${{ steps.extract_branch.outputs.branch }} | ||
steps: | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
|
||
bluehost: | ||
name: Bluehost Build and Test | ||
needs: setup | ||
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main | ||
with: | ||
module-repo: ${{ github.repository }} | ||
module-branch: ${{ needs.setup.outputs.branch }} | ||
plugin-repo: 'bluehost/bluehost-wordpress-plugin' | ||
secrets: inherit | ||
|
||
hostgator: | ||
name: HostGator Build and Test | ||
needs: setup | ||
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main | ||
with: | ||
module-repo: ${{ github.repository }} | ||
module-branch: ${{ needs.setup.outputs.branch }} | ||
plugin-repo: 'newfold-labs/wp-plugin-hostgator' | ||
secrets: inherit | ||
|
||
web: | ||
name: Web.com Build and Test | ||
needs: setup | ||
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main | ||
with: | ||
module-repo: ${{ github.repository }} | ||
module-branch: ${{ needs.setup.outputs.branch }} | ||
plugin-repo: 'newfold-labs/wp-plugin-web' | ||
secrets: inherit | ||
|
||
crazydomains: | ||
name: Crazy Domains Build and Test | ||
needs: setup | ||
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main | ||
with: | ||
module-repo: ${{ github.repository }} | ||
module-branch: ${{ needs.setup.outputs.branch }} | ||
plugin-repo: 'newfold-labs/wp-plugin-crazy-domains' | ||
secrets: inherit | ||
|
||
mojo: | ||
name: Mojo Build and Test | ||
needs: setup | ||
uses: newfold-labs/workflows/.github/workflows/module-plugin-test.yml@main | ||
with: | ||
module-repo: ${{ github.repository }} | ||
module-branch: ${{ needs.setup.outputs.branch }} | ||
plugin-repo: 'newfold-labs/wp-plugin-mojo' | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,59 @@ | ||
// <reference types="Cypress" /> | ||
|
||
describe('Performance Page', function () { | ||
let appClass = '.' + Cypress.env('appId'); | ||
|
||
before(() => { | ||
cy.visit('/wp-admin/admin.php?page=' + Cypress.env('pluginId') + '#/performance'); | ||
describe( 'Performance Page', function () { | ||
const appClass = '.' + Cypress.env( 'appId' ); | ||
|
||
before( () => { | ||
cy.visit( | ||
'/wp-admin/admin.php?page=' + | ||
Cypress.env( 'pluginId' ) + | ||
'#/performance' | ||
); | ||
cy.injectAxe(); | ||
|
||
}); | ||
} ); | ||
|
||
it('Is Accessible', () => { | ||
cy.wait(500); | ||
cy.checkA11y( appClass + '-app-body'); | ||
}); | ||
it( 'Is Accessible', () => { | ||
cy.wait( 500 ); | ||
cy.checkA11y( appClass + '-app-body' ); | ||
} ); | ||
|
||
it('Has Cache Settings', () => { | ||
cy.get('.newfold-cache-settings') | ||
it( 'Has Cache Settings', () => { | ||
cy.get( '.newfold-cache-settings' ) | ||
.scrollIntoView() | ||
.should('be.visible'); | ||
}); | ||
.should( 'be.visible' ); | ||
} ); | ||
|
||
it('Has Clear Cache Settings', () => { | ||
cy.get('.newfold-clear-cache') | ||
it( 'Has Clear Cache Settings', () => { | ||
cy.get( '.newfold-clear-cache' ) | ||
.scrollIntoView() | ||
.should('be.visible'); | ||
}); | ||
|
||
it('Clear Cache Disabled when Cache is Disabled', () => { | ||
.should( 'be.visible' ); | ||
} ); | ||
|
||
cy.get('input[type="radio"]#cache-level-0').check(); | ||
it( 'Clear Cache Disabled when Cache is Disabled', () => { | ||
cy.get( 'input[type="radio"]#cache-level-0' ).check(); | ||
|
||
cy.wait(500); | ||
cy.wait( 500 ); | ||
|
||
cy.get('.clear-cache-button') | ||
cy.get( '.clear-cache-button' ) | ||
.scrollIntoView() | ||
.should('have.attr', 'disabled'); | ||
.should( 'have.attr', 'disabled' ); | ||
|
||
cy.get('input[type="radio"]#cache-level-1').check(); | ||
cy.get( 'input[type="radio"]#cache-level-1' ).check(); | ||
|
||
cy.get('.clear-cache-button') | ||
cy.get( '.clear-cache-button' ) | ||
.scrollIntoView() | ||
.should('not.have.attr', 'disabled'); | ||
|
||
cy.get('.nfd-notifications') | ||
.contains('p', 'Cache') | ||
.should('be.visible'); | ||
}); | ||
|
||
it('Clear Cache Button Functions', () => { | ||
|
||
cy.get('.clear-cache-button').click(); | ||
|
||
|
||
cy.get('.nfd-notifications') | ||
.contains('p', 'Cache cleared') | ||
.should('be.visible'); | ||
|
||
}); | ||
|
||
}); | ||
.should( 'not.have.attr', 'disabled' ); | ||
|
||
cy.get( '.nfd-notifications' ) | ||
.contains( 'p', 'Cache' ) | ||
.should( 'be.visible' ); | ||
} ); | ||
|
||
it( 'Clear Cache Button Functions', () => { | ||
cy.get( '.clear-cache-button' ).click(); | ||
|
||
cy.get( '.nfd-notifications' ) | ||
.contains( 'p', 'Cache cleared' ) | ||
.should( 'be.visible' ); | ||
} ); | ||
} ); |