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

add wfh mode & test mode also update processSpecialReport #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timmyeats
Copy link

No description provided.

@dragonH dragonH self-requested a review August 10, 2021 07:42
@dragonH dragonH self-assigned this Aug 10, 2021
Copy link
Owner

@dragonH dragonH left a 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

Comment on lines +7 to +8
is_test=false
Copy link
Owner

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

Comment on lines +11 to +16
////////////////////////////////////////////////
// Where will you work today? WFH = ture / false
const is_wfh = ( "true" == process.env.is_wfh)
const is_test = ( "true" == process.env.is_test)
////////////////////////////////////////////////

Copy link
Owner

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

Comment on lines -43 to +49
headless: true,
headless: !is_test,
Copy link
Owner

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

Comment on lines +7 to +8
is_test=false
Copy link
Owner

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

Comment on lines +120 to +130
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"]');
}

Copy link
Owner

Choose a reason for hiding this comment

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

  • if..else indent, should be like below
if (xxxxx) {
    ....
} else {
    ....
}
  • in testing mode, language should be english

image

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.

2 participants