diff --git a/sysom_web/cypress/e2e/diagnosis/iofsstat_test.cy.js b/sysom_web/cypress/e2e/diagnosis/iofsstat_test.cy.js new file mode 100644 index 0000000000000000000000000000000000000000..c0462370553d64d74eae8fe9d22d9a93ced13ef2 --- /dev/null +++ b/sysom_web/cypress/e2e/diagnosis/iofsstat_test.cy.js @@ -0,0 +1,36 @@ +/// + +describe("SysOM Diagnosis Test -- iofsstat", () => { + beforeEach(() => { + // 自动登录 + cy.login() + }) + it("Invoke iofsstat diagnosis, and check result", () => { + //cy.wait(5000) + cy.sysomDiagnosisCheck( + // 诊断前端url + "/diagnose/storage/iofsstat", + + // 诊断参数 + { + "instance": "127.0.0.1", + "timeout": "5", + }, + (result) => { + // result => 包含诊断API返回的诊断详情数据 + + //////////////////////////////////////////////////////////// + // 在此处补充诊断详情渲染后的前端页面是否符合预期 + // 断言文档:https://docs.cypress.io/guides/references/assertions#Text-Content + //////////////////////////////////////////////////////////// + /* ==== Generated with Cypress Studio ==== */ + // cy.get('.ant-statistic-content-value').click() + cy.get(':nth-child(1) > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "diagnose result"); + cy.get(':nth-child(2) > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "Disk IO traffic analysis"); + cy.get(':nth-child(3) > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "Process IO traffic analysis"); + cy.get(':nth-child(4) > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "Process IO Block Size Distribution"); + //cy.get('.ant-statistic-content-value').should("contain.text", "total") + /* ==== End Cypress Studio ==== */ + }) + }) +}) \ No newline at end of file diff --git a/sysom_web/cypress/e2e/diagnosis/iohang_test.cy.js b/sysom_web/cypress/e2e/diagnosis/iohang_test.cy.js new file mode 100644 index 0000000000000000000000000000000000000000..28f955005afeaacfd7728c47291544c48a82a36c --- /dev/null +++ b/sysom_web/cypress/e2e/diagnosis/iohang_test.cy.js @@ -0,0 +1,36 @@ +/// + +describe("SysOM Diagnosis Test -- iohang", () => { + beforeEach(() => { + // 自动登录 + cy.login() + }) + it("Invoke iohang diagnosis, and check result", () => { + //cy.wait(5000) + cy.sysomDiagnosisCheck( + // 诊断前端url + "/diagnose/storage/iohang", + + // 诊断参数 + { + "instance": "127.0.0.1", + "threshold": "1", + "timeout": "10", + }, + (result) => { + // result => 包含诊断API返回的诊断详情数据 + + //////////////////////////////////////////////////////////// + // 在此处补充诊断详情渲染后的前端页面是否符合预期 + // 断言文档:https://docs.cypress.io/guides/references/assertions#Text-Content + //////////////////////////////////////////////////////////// + /* ==== Generated with Cypress Studio ==== */ + // cy.get('.ant-statistic-content-value').click() + cy.get('.ant-pro-card-border.ant-pro-card-contain-card > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "IO HANG overview"); + cy.get(':nth-child(1) > .ant-pro-card > .ant-pro-card-body > .ant-statistic > .ant-statistic-content > .ant-statistic-content-value').invoke('text').should("match", /normal|abnormal/); + cy.get(':nth-child(2) > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "More details of TOP 10 IO"); + //cy.get('.ant-statistic-content-value').should("contain.text", "total") + /* ==== End Cypress Studio ==== */ + }) + }) +}) \ No newline at end of file diff --git a/sysom_web/cypress/e2e/diagnosis/iolatency_test.cy.js b/sysom_web/cypress/e2e/diagnosis/iolatency_test.cy.js new file mode 100644 index 0000000000000000000000000000000000000000..0f8499bfe2783bed8ae5fde5ef1e8d65e9548db3 --- /dev/null +++ b/sysom_web/cypress/e2e/diagnosis/iolatency_test.cy.js @@ -0,0 +1,39 @@ +/// + +describe("SysOM Diagnosis Test -- iolatency", () => { + beforeEach(() => { + // 自动登录 + cy.login() + }) + it("Invoke iolatency diagnosis, and check result", () => { + //cy.wait(5000) + cy.sysomDiagnosisCheck( + // 诊断前端url + "/diagnose/storage/iolatency", + + // 诊断参数 + { + "instance": "127.0.0.1", + "timeout": "5", + "threshold": "1" + }, + + (result) => { + // result => 包含诊断API返回的诊断详情数据 + + //////////////////////////////////////////////////////////// + // 在此处补充诊断详情渲染后的前端页面是否符合预期 + // 断言文档:https://docs.cypress.io/guides/references/assertions#Text-Content + //////////////////////////////////////////////////////////// + /* ==== Generated with Cypress Studio ==== */ + // cy.get('.ant-statistic-content-value').click() + cy.get('.ant-pro-card-border.ant-pro-card-contain-card > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "Iolatency overview"); + cy.get(':nth-child(1) > .ant-pro-card > .ant-pro-card-body > .ant-statistic > .ant-statistic-content > .ant-statistic-content-value').invoke('text').should("match", /normal|abnormal/); + cy.get(':nth-child(2) > .ant-pro-card-header').should("contain.text", "Overall delay distribution"); + cy.get(':nth-child(3) > .ant-pro-card-header').should("contain.text", "Single IO delay metrics display"); + cy.get(':nth-child(4) > .ant-pro-card-header > .ant-pro-card-title').should("contain.text", "More details of TOP 10 IO"); + //cy.get('.ant-statistic-content-value').should("contain.text", "total") + /* ==== End Cypress Studio ==== */ + }) + }) +}) \ No newline at end of file