Skip to content

Commit

Permalink
Remove PPoF test
Browse files Browse the repository at this point in the history
  • Loading branch information
jshawl committed Oct 3, 2023
1 parent 9e15eb5 commit fd386a1
Showing 1 changed file with 0 additions and 95 deletions.
95 changes: 0 additions & 95 deletions test/integration/tests/button/size.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,101 +147,6 @@ describe(`paypal button component sizes`, () => {
.render(container);
});

it("should render a responsive PPoF button in the medium spectrum with menu button displayed", (done) => {
done = once(done);

const containerWidth = 250;

const container = createElement(
"div",
{
style: {
width: `${containerWidth}px`,
height: "100px",
},
},
getElement("#testContainer")
);

const fundingSource = FUNDING.PAYPAL;
const content = testContent;
const wallet = {
[fundingSource]: {
instruments: [
{
accessToken: null,
instrumentID: "abc12345",
label: "••1234",
logoUrl: null,
oneClick: true,
planID: null,
secondaryInstruments: [
{
instrumentID: "BALANCEUSD",
label: "PayPal Balance",
type: "BALANCE",
},
],
tokenID: null,
type: "card",
vendor: "VISA",
},
],
},
};

window.paypal
.Buttons({
content,

fundingSource,

wallet,

showPayLabel: false,

style: {
layout: "horizontal",
tagline: false,
},

test: {},

createOrder() {
done(new Error("Expected createOrder() to not be called"));
},

onApprove() {
done(new Error("Expected onApprove() to not be called"));
},

onRendered() {
setTimeout(() => {
const paypalButton = getElementRecursive(".paypal-button");
const paypalButtonWidth = paypalButton.offsetWidth;
const menuButton = getElementRecursive(".menu-button");

if (!menuButton) {
return done(
new Error("Expected menu button to be rendered to the DOM")
);
}

if (paypalButtonWidth === containerWidth) {
return done(
new Error(
"Menu button should be visibile at >= 250px button width, but is scrolled out of view"
)
);
}

return done();
}, 100);
},
})
.render(container);
});

it("should render a responsive button in the large spectrum", (done) => {
done = once(done);

Expand Down

0 comments on commit fd386a1

Please sign in to comment.