-
Notifications
You must be signed in to change notification settings - Fork 1
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
add wfh mode & test mode also update processSpecialReport #13
base: main
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.
some of the code need to be fix
is_test=false |
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 follow naming style
camel-style & meaningful
e.g. isWFH
, isTestingENV
//////////////////////////////////////////////// | ||
// Where will you work today? WFH = ture / false | ||
const is_wfh = ( "true" == process.env.is_wfh) | ||
const is_test = ( "true" == process.env.is_test) | ||
//////////////////////////////////////////////// | ||
|
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.
should be initialized in main
function
headless: true, | ||
headless: !is_test, |
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 follow naming style
camel-style & meaningful
e.g. isWFH
, isTestingENV
is_test=false |
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.
value should not be defined in .template
file
if (is_test) { | ||
await _page.waitForTimeout(2000); | ||
await _page.waitForSelector('input[value="登入"]', { timeout: 60000 }); | ||
await _page.click('input[value="登入"]'); | ||
} | ||
|
||
else { | ||
await _page.waitForSelector('input[value="Sign in"]', { timeout: 60000 }); | ||
await _page.click('input[value="Sign in"]'); | ||
} | ||
|
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.
No description provided.