Files
wp-plugin-starter-template-…/cypress/e2e/playground-single-site.cy.js
Marcus Quinn 4228bcc330 fix: simplify responsive breakpoint comment in admin-styles.css (issue #93) (#105)
* fix: remove redundant Responsive Styles comment in admin-styles.css (issue #93)

Removes the generic '/* Responsive Styles */' comment that was redundant
alongside the specific '/* 782px is the WordPress mobile admin breakpoint. */'
comment, per Gemini Code Assist review feedback on PR #87.

Closes #93

* fix: add missing trailing commas to fix comma-dangle lint errors

Fixes ESLint comma-dangle errors in:
- cypress.config.js (lines 15-16): missing trailing commas on
  chromeWebSecurity property and closing e2e object brace
- cypress/e2e/playground-single-site.cy.js (line 23): missing trailing
  comma on expect() message argument

Also updates eslint-plugin-cypress from ^2.15.1 to ^6.2.0 to resolve
peer dependency conflict that prevented local lint verification.
2026-03-18 22:57:17 +00:00

49 lines
1.6 KiB
JavaScript

/* eslint-env mocha, jquery, cypress */
describe('WordPress Playground Single Site Tests', () => {
beforeEach(() => {
cy.visit('/', { timeout: 30000 });
});
it('Can access the site', () => {
cy.get('body', { timeout: 15000 }).should('exist');
});
it('Can access the admin area', () => {
cy.loginAsAdmin();
cy.get('#wpadminbar', { timeout: 15000 }).should('exist');
});
it('Plugin is activated', () => {
cy.loginAsAdmin();
cy.visit('/wp-admin/plugins.php', { timeout: 30000 });
cy.get('body', { timeout: 15000 }).then(($body) => {
expect(
$body.find('tr[data-slug="wp-plugin-starter-template-for-ai-coding"] .deactivate a').length,
'Starter template plugin should be present and active',
).to.be.greaterThan(0);
if ($body.text().includes('Plugin Toggle')) {
cy.contains('tr', 'Plugin Toggle').should('exist');
cy.contains('tr', 'Plugin Toggle').find('.deactivate').should('exist');
} else {
cy.log('Plugin Toggle not found, skipping check');
}
if ($body.text().includes('Kadence Blocks')) {
cy.contains('tr', 'Kadence Blocks').find('.deactivate').should('exist');
} else {
cy.log('Kadence Blocks plugin not found, skipping check');
}
});
});
it('Plugin settings page loads correctly', () => {
cy.loginAsAdmin();
cy.visit('/wp-admin/options-general.php', { timeout: 30000 });
cy.get('#wpbody-content', { timeout: 15000 }).should('exist');
cy.get('h1').should('be.visible');
cy.title().should('include', 'Settings');
});
});