Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
This commit is contained in:
Shahir Ahmed
2025-02-12 18:39:03 -05:00
parent 5366e8b692
commit db4ea020ba

View File

@@ -83,50 +83,53 @@ section Checkout from website
{ journey: { useMaxWidth: true } } { journey: { useMaxWidth: true } }
); );
let rightEdgeXInitial, leftEdgeXInitial, rightEdgeXFinal, leftEdgeXFinal, initialDifference, finalDifference; let rightEdgeXInitial,
leftEdgeXInitial,
rightEdgeXFinal,
leftEdgeXFinal,
initialDifference,
finalDifference;
cy.contains('tspan', 'admin Exjjjnjjjj qwerty') cy.contains('tspan', 'admin Exjjjnjjjj qwerty').then((textBox) => {
.invoke('getBBox') const bbox = textBox[0].getBBox();
.then((bbox) => { const rightEdge = bbox.x + bbox.width;
rightEdgeXInitial = bbox.x + bbox.width; console.warn(rightEdge);
cy.log(`Right edge x-coordinate: ${rightEdgeXInitial}`); });
});
cy.contains('div.label', 'Make preBuilt') cy.get(':nth-child(14) > switch > foreignobject').then((rect) => {
.invoke('getBoundingClientRect') console.warn(rect);
.then((rect) => { //const leftEdgeXInitial = rect.left;
leftEdgeXInitial = rect.left; // cy.log(`Left edge x-coordinate: ${leftEdgeXInitial}`);
cy.log(`Left edge x-coordinate: ${leftEdgeXInitial}`); // initialDifference = leftEdgeXInitial - rightEdgeXInitial;
initialDifference = leftEdgeXInitial - rightEdgeXInitial; // cy.log(`Initial Difference: ${initialDifference}`);
cy.log(`Initial Difference: ${initialDifference}`); });
});
// renderGraph( // renderGraph(
// `journey // `journey
// title Web hook life cycle // title Web hook life cycle
// section Darkoob // section Darkoob
// Make preBuilt:5: Darkoob user // Make preBuilt:5: Darkoob user
// register slug : 5: Darkoob userf deliberately increasing the size of this label to check if distance between legend and diagram is maintained // register slug : 5: Darkoob userf deliberately increasing the size of this label to check if distance between legend and diagram is maintained
// Map slug to a Prebuilt Job:5: Darkoob user // Map slug to a Prebuilt Job:5: Darkoob user
// section External Service // section External Service
// set Darkoob slug as hook for an Event : 5 : admin Exjjjnjjjj qwerty // set Darkoob slug as hook for an Event : 5 : admin Exjjjnjjjj qwerty
// listen to the events : 5 : External Service // listen to the events : 5 : External Service
// call darkoob endpoint : 5 : External Service // call darkoob endpoint : 5 : External Service
// section Darkoob // section Darkoob
// check for inputs : 5 : DarkoobAPI // check for inputs : 5 : DarkoobAPI
// run the prebuilt job : 5 : DarkoobAPI // run the prebuilt job : 5 : DarkoobAPI
// `, // `,
// { journey: { useMaxWidth: true } } // { journey: { useMaxWidth: true } }
// ); // );
// cy.contains('tspan', 'Darkoob userf deliberately increasing the size of this label to check if distance between legend and diagram is maintained') // cy.contains('tspan', 'Darkoob userf deliberately increasing the size of this label to check if distance between legend and diagram is maintained')
// .invoke('getBBox') // .invoke('getBBox')
// .then((bbox) => { // .then((bbox) => {
// rightEdgeXFinal = bbox.x + bbox.width; // rightEdgeXFinal = bbox.x + bbox.width;
// cy.log(`Right edge x-coordinate final: ${rightEdgeXFinal}`); // cy.log(`Right edge x-coordinate final: ${rightEdgeXFinal}`);
// }); // });
// cy.contains('div.label', 'Make preBuilt') // cy.contains('div.label', 'Make preBuilt')
// .invoke('getBoundingClientRect') // .invoke('getBoundingClientRect')
// .then((rect) => { // .then((rect) => {
// leftEdgeXFinal = rect.left; // leftEdgeXFinal = rect.left;
@@ -136,9 +139,5 @@ section Checkout from website
// }); // });
// expect(initialDifference).toEqual(finalDifference); // expect(initialDifference).toEqual(finalDifference);
}); });
}); });