Skip to content

Commit 33a1246

Browse files
committed
fix lint errors
1 parent d5b1759 commit 33a1246

File tree

2 files changed

+1
-197
lines changed

2 files changed

+1
-197
lines changed

Diff for: test/integration/tests/button/props.js

+1-196
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
/* @flow */
22
/* eslint max-lines: 0 */
33

4-
import { wrapPromise, once, noop } from "@krakenjs/belter/src";
4+
import { wrapPromise } from "@krakenjs/belter/src";
55
import { FUNDING } from "@paypal/sdk-constants/src";
66
import { ZalgoPromise } from "@krakenjs/zalgo-promise/src";
77

88
import {
99
createTestContainer,
1010
destroyTestContainer,
1111
IPHONE6_USER_AGENT,
12-
getElementRecursive,
13-
assert,
1412
} from "../common";
1513

1614
describe(`paypal button component props`, () => {
@@ -234,196 +232,3 @@ describe(`paypal button component props`, () => {
234232
});
235233
});
236234
});
237-
238-
// describe.only(`paypal button props - PayPal app switch overlay`, () => {
239-
// beforeEach(() => {
240-
// createTestContainer();
241-
// });
242-
243-
// afterEach(() => {
244-
// destroyTestContainer();
245-
// });
246-
247-
// it("should call showPayPalAppSwitchOverlay and show the overlay", (done) => {
248-
// done = once(done);
249-
250-
// window.paypal
251-
// .Buttons({
252-
// test: {
253-
// flow: "popup",
254-
// action: "init",
255-
// onRender({ xprops }) {
256-
// xprops.showPayPalAppSwitchOverlay({
257-
// close: noop,
258-
// focus: noop,
259-
// });
260-
// assert.ok(getElementRecursive(".paypal-logo-paypal-rebrand"));
261-
// assert.ok(getElementRecursive(".paypal-logo-color-white"));
262-
// assert.ok(getElementRecursive(".paypal-checkout-message"));
263-
// assert.ok(getElementRecursive(".paypal-checkout-continue"));
264-
265-
// xprops.hidePayPalAppSwitchOverlay({ close: noop });
266-
267-
// done();
268-
// },
269-
// },
270-
// onApprove(): void {
271-
// return done(new Error("Expected onApprove to not be called"));
272-
// },
273-
// onCancel(): void {
274-
// return done(new Error("Expected onCancel to not be called"));
275-
// },
276-
// })
277-
// .render("#testContainer");
278-
// });
279-
280-
// it("should call showPayPalAppSwitchOverlay then show the overlay and call focus when continue is clicked", (done) => {
281-
// done = once(done);
282-
283-
// window.paypal
284-
// .Buttons({
285-
// test: {
286-
// flow: "popup",
287-
// action: "init",
288-
// onRender({ xprops }) {
289-
// let focusCalled = false;
290-
291-
// xprops.showPayPalAppSwitchOverlay({
292-
// close: noop,
293-
// focus: () => {
294-
// focusCalled = true;
295-
// },
296-
// });
297-
298-
// getElementRecursive(".paypal-checkout-continue").click();
299-
300-
// if (!focusCalled) {
301-
// done(new Error("Expected focus function to be called"));
302-
// }
303-
304-
// xprops.hidePayPalAppSwitchOverlay({ close: noop });
305-
306-
// done();
307-
// },
308-
// },
309-
// onApprove(): void {
310-
// return done(new Error("Expected onApprove to not be called"));
311-
// },
312-
// onCancel(): void {
313-
// return done(new Error("Expected onCancel to not be called"));
314-
// },
315-
// })
316-
// .render("#testContainer");
317-
// });
318-
319-
// it("should remove the overlay when hidePayPalAppSwitchOverlay", (done) => {
320-
// done = once(done);
321-
322-
// window.paypal
323-
// .Buttons({
324-
// test: {
325-
// flow: "popup",
326-
// action: "init",
327-
// onRender({ xprops }) {
328-
// let closeCalled = false;
329-
// const close = () => {
330-
// closeCalled = true;
331-
// };
332-
333-
// xprops.showPayPalAppSwitchOverlay({
334-
// close,
335-
// focus: noop,
336-
// });
337-
338-
// if (closeCalled) {
339-
// done(
340-
// new Error("Expected close function to not be called on render")
341-
// );
342-
// }
343-
344-
// xprops.hidePayPalAppSwitchOverlay({ close });
345-
346-
// if (!closeCalled) {
347-
// done(new Error("Expected close function to be called"));
348-
// }
349-
350-
// // timeout is to allow time for animation to run for overlay removal
351-
// setTimeout(() => {
352-
// try {
353-
// if (getElementRecursive(".paypal-checkout-sandbox")) {
354-
// done(
355-
// new Error(
356-
// "Expected overlay to be removed from dom after close was called"
357-
// )
358-
// );
359-
// }
360-
// } catch {
361-
// // an error will be thrown if the overlay is not found, which means overlay was removed successfully
362-
// done();
363-
// }
364-
// }, 300);
365-
366-
// done();
367-
// },
368-
// },
369-
// onApprove(): void {
370-
// return done(new Error("Expected onApprove to not be called"));
371-
// },
372-
// onCancel(): void {
373-
// return done(new Error("Expected onCancel to not be called"));
374-
// },
375-
// })
376-
// .render("#testContainer");
377-
// });
378-
379-
// it("should call showPayPalAppSwitchOverlay then show the app switch overlay and call close when X is clicked", (done) => {
380-
// done = once(done);
381-
382-
// window.paypal
383-
// .Buttons({
384-
// test: {
385-
// flow: "popup",
386-
// action: "init",
387-
// onRender({ xprops }) {
388-
// let closeCalled = false;
389-
// xprops.showPayPalAppSwitchOverlay({
390-
// close: () => {
391-
// closeCalled = true;
392-
// },
393-
// focus: noop,
394-
// });
395-
396-
// getElementRecursive(".paypal-checkout-close").click();
397-
398-
// if (!closeCalled) {
399-
// done(new Error("Expected close function to be called"));
400-
// }
401-
402-
// // timeout is to allow time for animation to run for overlay removal
403-
// setTimeout(() => {
404-
// try {
405-
// if (getElementRecursive(".paypal-checkout-sandbox")) {
406-
// done(
407-
// new Error(
408-
// "Expected overlay to be removed from dom after close was called"
409-
// )
410-
// );
411-
// }
412-
// } catch {
413-
// // an error will be thrown if the overlay is not found, which means overlay was removed successfully
414-
// }
415-
416-
// done();
417-
// }, 300);
418-
// },
419-
// },
420-
// onApprove(): void {
421-
// return done(new Error("Expected onApprove to not be called"));
422-
// },
423-
// onCancel(): void {
424-
// return done(new Error("Expected onCancel to not be called"));
425-
// },
426-
// })
427-
// .render("#testContainer");
428-
// });
429-
// });

Diff for: test/integration/tests/button/style.js

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
getElementRecursive,
1212
assert,
1313
WEBVIEW_USER_AGENT,
14-
IPHONE6_USER_AGENT,
1514
mockProp,
1615
} from "../common";
1716

0 commit comments

Comments
 (0)