sysom1/sysom_web/cypress/e2e/diagnosis/iofsstat_test.cy.js

36 lines
1.7 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// <reference types="cypress" />
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 ==== */
})
})
})