Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DTPPCPSDK-1334] feat: add isWebView check to supportsPopups #112

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

xuanwan05
Copy link
Contributor

@xuanwan05 xuanwan05 commented Oct 25, 2023

Added isWebView() check to supportsPopups(), so new user agents for WebView which contains 'wv' will not support pop-ups.
Added all UA Strings to the test file.

UA does NOT support popup: dkdfsna/5.25.638 Dalvik/2.1.0 (Linux; U; Android 13; SM-S908U1 Build/TP1A.220624.014; wv )
Screenshot 2023-10-24 at 8 59 25 PM

UA supports popup : Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1
Screenshot 2023-10-24 at 9 01 00 PM

@xuanwan05 xuanwan05 requested a review from a team as a code owner October 25, 2023 15:53
Copy link
Contributor

@ravishekhar ravishekhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

}
});
it("should return false when userAgent is valid and contains 'wv' in the words only", () => {
window.navigator.userAgent = `dkdfsna/5.25.638 Dalwvik/2.1.0 (Linux; U; Android 13; SM-S908U1 Build/TP1A.220624.014;)`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a nit pick, its bit hard to notice wv is inside Dalwvik . Can you pls add a code comment.

@ravishekhar ravishekhar merged commit 1de54be into krakenjs:main Oct 26, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants