Apply repository-wide ESLint auto-fix formatting pass

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
2026-03-08 12:11:57 +08:00
parent 7c48faaa3d
commit 847904c49b
172 changed files with 13629 additions and 9154 deletions

View File

@@ -5,78 +5,86 @@
// cindy.chang@dsp.im (Cindy Chang), 2024/05/30
// imacat.yang@dsp.im (imacat), 2026/03/05
import { loginWithFixtures } from '../support/intercept';
import { loginWithFixtures } from "../support/intercept";
describe('Compare', () => {
describe("Compare", () => {
beforeEach(() => {
loginWithFixtures();
cy.visit('/files');
cy.wait('@getFiles');
cy.contains('li', 'COMPARE').click();
cy.visit("/files");
cy.wait("@getFiles");
cy.contains("li", "COMPARE").click();
});
it('Compare dropdown sorting options', () => {
it("Compare dropdown sorting options", () => {
const expectedOptions = [
'By File Name (A to Z)', 'By File Name (Z to A)',
'By Dependency (A to Z)', 'By Dependency (Z to A)',
'By File Type (A to Z)', 'By File Type (Z to A)',
'By Last Update (A to Z)', 'By Last Update (Z to A)',
"By File Name (A to Z)",
"By File Name (Z to A)",
"By Dependency (A to Z)",
"By Dependency (Z to A)",
"By File Type (A to Z)",
"By File Type (Z to A)",
"By Last Update (A to Z)",
"By Last Update (Z to A)",
];
cy.get('.p-select').click();
cy.get('.p-select-list')
.find('.p-select-option')
.then($options => {
cy.get(".p-select").click();
cy.get(".p-select-list")
.find(".p-select-option")
.then(($options) => {
const actualOptions = $options
.map((index, elem) => Cypress.$(elem).find('.p-select-option-label').text())
.map((index, elem) =>
Cypress.$(elem).find(".p-select-option-label").text(),
)
.get();
expect(actualOptions).to.deep.equal(expectedOptions);
});
});
it('Grid cards are rendered for compare file selection', () => {
cy.get('#compareGridCards').find('li').should('have.length.greaterThan', 0);
it("Grid cards are rendered for compare file selection", () => {
cy.get("#compareGridCards").find("li").should("have.length.greaterThan", 0);
});
it('Compare button is disabled until two files are dragged', () => {
cy.contains('button', 'Compare').should('be.disabled');
cy.get('#compareFile0').drag('#primaryDragCard');
cy.get('#compareFile1').drag('#secondaryDragCard');
cy.contains('button', 'Compare').should('be.enabled');
it("Compare button is disabled until two files are dragged", () => {
cy.contains("button", "Compare").should("be.disabled");
cy.get("#compareFile0").drag("#primaryDragCard");
cy.get("#compareFile1").drag("#secondaryDragCard");
cy.contains("button", "Compare").should("be.enabled");
});
it('Enter Compare dashboard and see charts', () => {
cy.get('#compareFile0').drag('#primaryDragCard');
cy.get('#compareFile1').drag('#secondaryDragCard');
cy.contains('button', 'Compare').click();
cy.wait('@getCompare');
cy.url().should('include', 'compare');
it("Enter Compare dashboard and see charts", () => {
cy.get("#compareFile0").drag("#primaryDragCard");
cy.get("#compareFile1").drag("#secondaryDragCard");
cy.contains("button", "Compare").click();
cy.wait("@getCompare");
cy.url().should("include", "compare");
// Assert chart title spans are visible
cy.contains('span', 'Average Cycle Time').should('exist');
cy.contains('span', 'Cycle Efficiency').should('exist');
cy.contains('span', 'Average Processing Time').should('exist');
cy.contains('span', 'Average Processing Time by Activity').should('exist');
cy.contains('span', 'Average Waiting Time').should('exist');
cy.contains('span', 'Average Waiting Time between Activity').should('exist');
cy.contains("span", "Average Cycle Time").should("exist");
cy.contains("span", "Cycle Efficiency").should("exist");
cy.contains("span", "Average Processing Time").should("exist");
cy.contains("span", "Average Processing Time by Activity").should("exist");
cy.contains("span", "Average Waiting Time").should("exist");
cy.contains("span", "Average Waiting Time between Activity").should(
"exist",
);
});
it('Compare State button exists on dashboard', () => {
cy.get('#compareFile0').drag('#primaryDragCard');
cy.get('#compareFile1').drag('#secondaryDragCard');
cy.contains('button', 'Compare').click();
cy.wait('@getCompare');
it("Compare State button exists on dashboard", () => {
cy.get("#compareFile0").drag("#primaryDragCard");
cy.get("#compareFile1").drag("#secondaryDragCard");
cy.contains("button", "Compare").click();
cy.wait("@getCompare");
cy.get('#compareState').should('exist').and('be.visible');
cy.get("#compareState").should("exist").and("be.visible");
});
it('Sidebar shows time usage and frequency sections', () => {
cy.get('#compareFile0').drag('#primaryDragCard');
cy.get('#compareFile1').drag('#secondaryDragCard');
cy.contains('button', 'Compare').click();
cy.wait('@getCompare');
it("Sidebar shows time usage and frequency sections", () => {
cy.get("#compareFile0").drag("#primaryDragCard");
cy.get("#compareFile1").drag("#secondaryDragCard");
cy.contains("button", "Compare").click();
cy.wait("@getCompare");
cy.get('aside').should('exist');
cy.get('aside li').should('have.length.greaterThan', 0);
cy.get("aside").should("exist");
cy.get("aside li").should("have.length.greaterThan", 0);
});
});