Ctrl K
ComunidadGuías…

agents-manage-ui/cypress/e2e/skills.cy.ts

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
describe('Skills', () => {
  it('should create a skill', () => {
    const fixture = {
      name: 'test-skill',
      description: 'test-description',
      content: 'test-content',
    };

    cy.visit('/default/projects/activities-planner/skills');
    cy.contains('Create skill').click();
    cy.get('[name=name]').type(fixture.name);
    cy.get('textarea[name=description]').type(fixture.description);
    cy.typeInMonaco('content.md', fixture.content);
    cy.contains('Advanced').click();
    cy.typeInMonaco('metadata.json', '{"foo":"only-string"}');
    cy.contains('Save').click();

    // Wait for either success redirect or error toast
    cy.get('[data-sonner-toast]', { timeout: 30_000 }).should('exist');
    // Verify creation succeeded (not an error)
    cy.get('[data-sonner-toast]').should('not.contain', 'error');
    for (const text of Object.values(fixture)) {
      cy.contains(text).should('exist');
    }
    cy.contains('foo: only-string').should('exist');
  });
});