45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
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');
|
|
});
|
|
});
|