Fix E2E tests for PrimeVue 4 CSS class rename (p-dropdown to p-select)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 11:47:25 +08:00
parent 8e480ed669
commit ec61bcd701
2 changed files with 8 additions and 8 deletions

View File

@@ -16,12 +16,12 @@ describe('Compare', () => {
'By Last Update (A to Z)', 'By Last Update (Z to A)', 'By Last Update (A to Z)', 'By Last Update (Z to A)',
]; ];
cy.get('.p-dropdown').click(); cy.get('.p-select').click();
cy.get('.p-dropdown-items') cy.get('.p-select-list')
.find('.p-dropdown-item') .find('.p-select-option')
.then($options => { .then($options => {
const actualOptions = $options const actualOptions = $options
.map((index, elem) => Cypress.$(elem).find('.p-dropdown-item-label').text()) .map((index, elem) => Cypress.$(elem).find('.p-select-option-label').text())
.get(); .get();
expect(actualOptions).to.deep.equal(expectedOptions); expect(actualOptions).to.deep.equal(expectedOptions);
}); });

View File

@@ -28,7 +28,7 @@ describe('Files Page - COMPARE Tab', () => {
}); });
it('shows sorting dropdown', () => { it('shows sorting dropdown', () => {
cy.get('.p-dropdown').should('exist'); cy.get('.p-select').should('exist');
}); });
it('grid cards display file names', () => { it('grid cards display file names', () => {
@@ -37,8 +37,8 @@ describe('Files Page - COMPARE Tab', () => {
}); });
it('clicking sorting dropdown shows sort options', () => { it('clicking sorting dropdown shows sort options', () => {
cy.get('.p-dropdown').click(); cy.get('.p-select').click();
cy.get('.p-dropdown-items').should('be.visible'); cy.get('.p-select-list').should('be.visible');
cy.contains('.p-dropdown-item', 'By File Name').should('exist'); cy.contains('.p-select-option', 'By File Name').should('exist');
}); });
}); });