Add E2E tests for my-account, account info modal, and compare tab
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
44
cypress/e2e/filesCompare.cy.js
Normal file
44
cypress/e2e/filesCompare.cy.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import { loginWithFixtures } from '../support/intercept';
|
||||
|
||||
describe('Files Page - COMPARE Tab', () => {
|
||||
beforeEach(() => {
|
||||
loginWithFixtures();
|
||||
cy.visit('/files');
|
||||
cy.wait('@getFiles');
|
||||
// Switch to COMPARE tab
|
||||
cy.contains('li', 'COMPARE').click();
|
||||
});
|
||||
|
||||
it('shows Performance Comparison heading', () => {
|
||||
cy.contains('h2', 'Performance Comparison').should('be.visible');
|
||||
});
|
||||
|
||||
it('shows two drag-and-drop slots', () => {
|
||||
cy.get('#primaryDragCard').should('exist');
|
||||
cy.get('#secondaryDragCard').should('exist');
|
||||
});
|
||||
|
||||
it('drag slots show placeholder text', () => {
|
||||
cy.get('#primaryDragCard').should('contain', 'Drag and drop a file here');
|
||||
cy.get('#secondaryDragCard').should('contain', 'Drag and drop a file here');
|
||||
});
|
||||
|
||||
it('Compare button is disabled when no files are dragged', () => {
|
||||
cy.contains('button', 'Compare').should('be.disabled');
|
||||
});
|
||||
|
||||
it('shows sorting dropdown', () => {
|
||||
cy.get('.p-dropdown').should('exist');
|
||||
});
|
||||
|
||||
it('grid cards display file names', () => {
|
||||
cy.get('#compareGridCards').should('exist');
|
||||
cy.get('#compareGridCards li').should('have.length.greaterThan', 0);
|
||||
});
|
||||
|
||||
it('clicking sorting dropdown shows sort options', () => {
|
||||
cy.get('.p-dropdown').click();
|
||||
cy.get('.p-dropdown-items').should('be.visible');
|
||||
cy.contains('.p-dropdown-item', 'By File Name').should('exist');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user