1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-20 12:07:44 +00:00

Added Stimulus and moved the matstats vanilla js to stimulus controllers. Same with the spectate page.

This commit is contained in:
Your Name
2025-05-20 17:22:48 -04:00
parent 0326d87261
commit 53e16952bf
22 changed files with 2649 additions and 1580 deletions

View File

@@ -85,7 +85,19 @@ describe('Pool to bracket setup', () => {
cy.contains('New Mat').first().click();
cy.url().should('include', '/mats/new');
cy.get('input[name="mat[name]"]').type('1'); // Mat name is just '1'
cy.get('input[type="submit"]').click({ multiple: true });
// Intercept the form submission response to wait for it
cy.intercept('POST', '/mats').as('createMat');
// Wait for the Submit button to be fully rendered and ready
cy.get('input[type="submit"]').should('be.visible').should('be.enabled').wait(1000);
// Submit the form and wait for the response
cy.get('input[type="submit"]').click();
cy.wait('@createMat');
// Verify we're redirected back and the mat is created
cy.url().should('match', /\/tournaments\/\d+$/);
cy.contains('a', 'Mat 1').should('be.visible');
}
});
@@ -110,7 +122,19 @@ describe('Pool to bracket setup', () => {
cy.contains('New Mat').first().click();
cy.url().should('include', '/mats/new');
cy.get('input[name="mat[name]"]').type('1'); // Mat name is just '1'
cy.get('input[type="submit"]').click({ multiple: true });
// Intercept the form submission response to wait for it
cy.intercept('POST', '/mats').as('createMat');
// Wait for the Submit button to be fully rendered and ready
cy.get('input[type="submit"]').should('be.visible').should('be.enabled').wait(1000);
// Submit the form and wait for the response
cy.get('input[type="submit"]').click();
cy.wait('@createMat');
// Verify we're redirected back and the mat is created
cy.url().should('match', /\/tournaments\/\d+$/);
cy.contains('a', 'Mat 1').should('be.visible');
}
});