Update to version 0.1.5 with testing setup, multisite compatibility, and npm scripts

This commit is contained in:
2025-04-18 14:32:46 +01:00
parent 9d3e67d16b
commit bfac63799b
9 changed files with 269 additions and 19 deletions

View File

@@ -0,0 +1,27 @@
/**
* Basic e2e test for the plugin.
*/
describe('Plugin Basic Tests', () => {
before(() => {
cy.login();
});
it('Should activate the plugin', () => {
cy.visit('/wp-admin/plugins.php');
cy.contains('WP Plugin Starter Template').should('exist');
// Check if plugin is not active, then activate it
cy.get('tr[data-slug="wp-plugin-starter-template-for-ai-coding"]')
.then(($tr) => {
if ($tr.hasClass('inactive')) {
cy.wrap($tr).find('.activate a').click();
cy.contains('Plugin activated.').should('exist');
}
});
});
it('Should have the plugin settings page', () => {
cy.visit('/wp-admin/options-general.php?page=wp-plugin-starter-template');
cy.contains('WP Plugin Starter Template Settings').should('exist');
});
});