-
Notifications
You must be signed in to change notification settings - Fork 129
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
ADDED open in app dialog popup #690
base: archived-develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add Test cases
js/index.js
Outdated
window.onload = femo(); | ||
|
||
function femo() { | ||
console.log('efd'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console log
js/index.js
Outdated
let regexp = /android|iphone|kindle|ipad/i; | ||
let details = navigator.userAgent; | ||
let isMobileDevice = regexp.test(details); | ||
window.onload = femo(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's femo ?
Refactored code and written test cases @shreya-mishra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve spacing one line spacing after function ends/in css
__test__/index.test.js
Outdated
}); | ||
test(`don't show dialog if not open in phone`, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: add line spacing here
__test__/index.test.js
Outdated
expect(result).toBe('true'); | ||
}); | ||
test(`don't show dialog if not open in phone`, () => { | ||
const regexp = /Windows|macOS|/i; // for PC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const regexp = /Windows|macOS|/i; // for PC | |
const regexp = /Windows|macOS|/i; // for desktop devices |
js/index.js
Outdated
document.getElementById('okayBt').addEventListener('click', openApp); | ||
document.getElementById('cancleBt').addEventListener('click', closeDialog); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use shorthands for naming that are hard to understand, also there is typo in cancel button
js/index.js
Outdated
var timeTaken = Date.now() - startTime; | ||
if (timeTaken <= 1000) { | ||
flag = true; | ||
} | ||
}); | ||
|
||
setTimeout(function () { | ||
if (!flag) { | ||
document.body.removeChild(iframe); | ||
window.location.href = fallbackURL; | ||
} | ||
}, 1000); // Adjust the delay as needed | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the intention of this part of the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This is for if time taken to come from rds mobile app is more then it means app is install.
- If flag is false means app doesn't install in phone and then it will re-direct to playstore(App mentioned in fallback url).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use const variables instead of let and var where ever it can be done
why there's so much changes in index.html file? |
When you uninstalled why it is opening github app not rds mobille app? |
With this PR if I am in android I have to mobile app regardless if I want to use RDS website? |
Tests are failing please have a look |
Due to some replacement of code it is shows much changes here. |
It is for demo purpose. |
Issue Open RDS app from www-site
Issue:
Real-Dev-Squad/mobile-app#269
Changes:
Recording:
WhatsApp.Video.2023-10-06.at.2.43.44.PM.mp4