Frontend principal de GEMCO
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
GEMCOFrontend/cypress/e2e/GEMCO/Heineken/newTraffic.cy.js

60 lines
2.2 KiB

/// <reference types="cypress" />
describe("empty spec", () => {
it("Heineken new traffic", () => {
cy.viewport(1400, 700);
cy.visit("");
cy.get('[name="Usuario"]').type("alfonso");
cy.get('[name="Contrasena"]').type("garcia");
cy.get('[type="submit"]').click();
cy.visit("/RptCorresponsalesTraficos?proc=1&modo=1");
cy.contains("Nuevo").click();
cy.get("select#CmbCliente").select("2206");
cy.get("select#CmbOpEntrada").select("1");
cy.get("select#CmbOpSalida").select("1");
cy.get("select#CmbIDCorresponsal").select("16");
cy.get("#BtnSave1").click();
cy.wait(2000);
cy.get("#LinkFacturas123").click();
let total = 123456;
Cypress._.times(1, (k) => {
const uuid = () => Cypress._.random(0, 1e6);
const id = uuid();
const Factura = `F${id}`;
const Pedido = `P${id}`;
total = total + 10;
cy.get("#Factura").clear();
cy.get("#ValorFacturaDls").clear();
cy.get("#Pedido").clear();
cy.get("#Factura").type(Factura);
cy.get("#ValorFacturaDls").type(total);
cy.get("#Pedido").type(Pedido);
cy.get("#IDProveedor").select("51");
cy.get("#BtnSave").click();
cy.wait(2000);
});
cy.get("body").trigger("keydown", { keyCode: 27 });
cy.wait(1000);
cy.contains("Informacion corresponsal").click();
const uuid = () => Cypress._.random(0, 1e6);
const id = uuid();
cy.get("#CTrafico").type(`TRA${id}`);
cy.get("#FechaEntrada").type("2022-11-17");
cy.get("#FechaRevalidacionGuia").type("2022-11-17");
cy.get("#CFechaPago").type("2022-11-17");
Cypress._.times(10, (k) => {
cy.contains("Agregar").click();
cy.wait(1000);
cy.get("#CmbFacturas").select(1);
cy.get("#DescripcionMaterial").type(
"Esta es la descripcion del material"
);
cy.get("#FraccionArancelaria").type("FA123456");
cy.get("#ValorAduana").type("124578");
cy.get("#CDTA").type("224466", { force: true });
cy.get("#CIGI").type("446688", { force: true });
cy.get("#CIEPS").type("668800", { force: true });
cy.get("#BtnSavePartida").click();
cy.get("body").trigger("keydown", { keyCode: 27 });
});
});
});