forked from Codeinwp/neve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Codeinwp#2770 from Codeinwp/dojo/copyright-test
test: adds copyright-component tests
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
e2e-tests/cypress/fixtures/customizer/hfg/hfg-copyright-component-setup.json
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,4 @@ | ||
{ | ||
"footer_copyright_content": "This is a test {current_year}", | ||
"footer_copyright_color": "#e30606" | ||
} |
16 changes: 16 additions & 0 deletions
16
e2e-tests/cypress/integration/customizer/hfg/hfg-copyright-component.spec.ts
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,16 @@ | ||
describe('Copyright component test', function () { | ||
before('Sets up the copyright component in footer', function () { | ||
cy.fixture('customizer/hfg/hfg-copyright-component-setup').then((componentSetup) => { | ||
cy.setCustomizeSettings(componentSetup); | ||
}); | ||
}); | ||
|
||
it('Checks the copyright component in front-end', function () { | ||
cy.visit('/'); | ||
cy.contains('This is a test ' + new Date().getFullYear()).should( | ||
'have.css', | ||
'color', | ||
'rgb(227, 6, 6)', | ||
); | ||
}); | ||
}); |