{
  "stats": {
    "suites": 1,
    "tests": 3,
    "passes": 3,
    "pending": 0,
    "failures": 0,
    "start": "2025-11-08T09:29:48.016Z",
    "end": "2025-11-08T09:29:56.969Z",
    "duration": 8953,
    "testsRegistered": 3,
    "passPercent": 100,
    "pendingPercent": 0,
    "other": 0,
    "hasOther": false,
    "skipped": 0,
    "hasSkipped": false
  },
  "results": [
    {
      "uuid": "d1375b95-3db7-440f-bf51-94e725dd8444",
      "title": "",
      "fullFile": "cypress\\e2e\\relatorios_compras_abc.cy.js",
      "file": "cypress\\e2e\\relatorios_compras_abc.cy.js",
      "beforeHooks": [],
      "afterHooks": [],
      "tests": [],
      "suites": [
        {
          "uuid": "85a0da7f-1649-4a3f-9013-361617de5401",
          "title": "Relatórios de Compras - Curva ABC",
          "fullFile": "",
          "file": "",
          "beforeHooks": [],
          "afterHooks": [],
          "tests": [
            {
              "title": "Carrega a página e exibe controles e tabela ABC",
              "fullTitle": "Relatórios de Compras - Curva ABC Carrega a página e exibe controles e tabela ABC",
              "timedOut": null,
              "duration": 3461,
              "state": "passed",
              "speed": "fast",
              "pass": true,
              "fail": false,
              "pending": false,
              "context": null,
              "code": "cy.intercept('GET', '/api/compras/relatorios/por-fornecedor*', stubFornecedor).as('forn');\ncy.intercept('GET', '/api/compras/relatorios/ordens-por-status*', stubStatus).as('status');\ncy.intercept('GET', '/api/compras/relatorios/itens-top*', stubItensTop).as('top');\ncy.intercept('GET', '**/api/compras/relatorios/abc*', stubAbcItems).as('abc');\ncy.visit(pageUrl);\ncy.wait('@forn', {\n  timeout: 10000\n});\ncy.wait('@status', {\n  timeout: 10000\n});\ncy.wait('@top', {\n  timeout: 10000\n});\ncy.wait('@abc', {\n  timeout: 10000\n});\ncy.get('#f-start').should('exist');\ncy.get('#f-end').should('exist');\ncy.get('#f-limit').should('exist');\ncy.get('#btn-aplicar').should('exist');\ncy.get('#abc-metric').should('exist');\ncy.get('#abc-a-pct').should('exist').and('have.value', '80');\ncy.get('#abc-b-pct').should('exist').and('have.value', '15');\ncy.get('#abc-c-pct').should('exist').and('have.value', '5');\ncy.get('#abc-threshold-label').should('contain.text', 'A=80%').and('contain.text', 'B=15%').and('contain.text', 'C=5%');\ncy.get('#tbl-abc tbody tr').should('have.length.greaterThan', 0);\ncy.get('#tbl-abc tbody tr').first().contains('Cabo HDMI');",
              "err": {},
              "uuid": "bd033b08-9817-44fc-9230-56adec884c9f",
              "parentUUID": "85a0da7f-1649-4a3f-9013-361617de5401",
              "isHook": false,
              "skipped": false
            },
            {
              "title": "Recalcula ABC ao alterar thresholds e envia na API",
              "fullTitle": "Relatórios de Compras - Curva ABC Recalcula ABC ao alterar thresholds e envia na API",
              "timedOut": null,
              "duration": 3065,
              "state": "passed",
              "speed": "fast",
              "pass": true,
              "fail": false,
              "pending": false,
              "context": null,
              "code": "cy.intercept('GET', '/api/compras/relatorios/por-fornecedor*', stubFornecedor).as('forn');\ncy.intercept('GET', '/api/compras/relatorios/ordens-por-status*', stubStatus).as('status');\ncy.intercept('GET', '/api/compras/relatorios/itens-top*', stubItensTop).as('top');\ncy.intercept('GET', '**/api/compras/relatorios/abc*', stubAbcItems).as('abc');\ncy.visit(pageUrl);\ncy.wait('@forn', {\n  timeout: 10000\n});\ncy.wait('@status', {\n  timeout: 10000\n});\ncy.wait('@top', {\n  timeout: 10000\n});\ncy.wait('@abc');\ncy.get('#abc-a-pct').clear().type('90').blur();\ncy.get('#abc-b-pct').clear().type('5').blur();\ncy.get('#abc-c-pct').clear().type('5').blur();\ncy.get('#btn-aplicar', {\n  timeout: 10000\n}).click();\ncy.get('@abc.all').then(calls => {\n  const last = calls[calls.length - 1];\n  const url = last.request.url;\n  expect(url).to.include('a_pct=0.9');\n  expect(url).to.include('b_pct=0.05');\n});\ncy.get('#abc-threshold-label').should('contain.text', 'A=90%').and('contain.text', 'B=5%').and('contain.text', 'C=5%');",
              "err": {},
              "uuid": "2cd05528-1bba-448f-9741-90c25597ae6e",
              "parentUUID": "85a0da7f-1649-4a3f-9013-361617de5401",
              "isHook": false,
              "skipped": false
            },
            {
              "title": "Exporta CSV e PDF da ABC sem alertas",
              "fullTitle": "Relatórios de Compras - Curva ABC Exporta CSV e PDF da ABC sem alertas",
              "timedOut": null,
              "duration": 2190,
              "state": "passed",
              "speed": "fast",
              "pass": true,
              "fail": false,
              "pending": false,
              "context": null,
              "code": "cy.intercept('GET', '/api/compras/relatorios/por-fornecedor*', stubFornecedor).as('forn');\ncy.intercept('GET', '/api/compras/relatorios/ordens-por-status*', stubStatus).as('status');\ncy.intercept('GET', '/api/compras/relatorios/itens-top*', stubItensTop).as('top');\ncy.intercept('GET', '**/api/compras/relatorios/abc*', stubAbcItems).as('abc');\ncy.visit(pageUrl);\ncy.wait('@forn', {\n  timeout: 10000\n});\ncy.wait('@status', {\n  timeout: 10000\n});\ncy.wait('@top', {\n  timeout: 10000\n});\ncy.wait('@abc', {\n  timeout: 10000\n});\ncy.window().then(win => {\n  cy.stub(win.URL, 'createObjectURL').callsFake(() => 'blob:stub');\n  const openStub = cy.stub(win, 'open').callsFake(() => ({\n    document: {\n      write() {},\n      close() {}\n    },\n    focus() {},\n    print() {}\n  }));\n  cy.get('#btn-export-abc-csv').click();\n  cy.wrap(win.URL.createObjectURL).should('have.been.called');\n  cy.get('#btn-export-abc-pdf').click();\n  cy.wrap(openStub).should('have.been.called');\n});",
              "err": {},
              "uuid": "3d525ef8-88a0-400a-9f13-d438b8dec626",
              "parentUUID": "85a0da7f-1649-4a3f-9013-361617de5401",
              "isHook": false,
              "skipped": false
            }
          ],
          "suites": [],
          "passes": [
            "bd033b08-9817-44fc-9230-56adec884c9f",
            "2cd05528-1bba-448f-9741-90c25597ae6e",
            "3d525ef8-88a0-400a-9f13-d438b8dec626"
          ],
          "failures": [],
          "pending": [],
          "skipped": [],
          "duration": 8716,
          "root": false,
          "rootEmpty": false,
          "_timeout": 2000
        }
      ],
      "passes": [],
      "failures": [],
      "pending": [],
      "skipped": [],
      "duration": 0,
      "root": true,
      "rootEmpty": true,
      "_timeout": 2000
    }
  ],
  "meta": {
    "mocha": {
      "version": "7.0.1"
    },
    "mochawesome": {
      "options": {
        "quiet": true,
        "reportFilename": "mochawesome",
        "saveHtml": true,
        "saveJson": true,
        "consoleReporter": "spec",
        "useInlineDiffs": false,
        "code": true
      },
      "version": "7.1.4"
    },
    "marge": {
      "options": {
        "id": "default",
        "reportDir": "cypress/reports/mochawesome",
        "overwrite": false,
        "html": true,
        "json": true,
        "quiet": true
      },
      "version": "6.3.2"
    }
  }
}