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

Contribution: Create Sanity Test Suite #94

Open
1 task done
petermsouzajr opened this issue Jun 16, 2024 · 0 comments
Open
1 task done

Contribution: Create Sanity Test Suite #94

petermsouzajr opened this issue Jun 16, 2024 · 0 comments
Labels
needs triage Label for identifying issues requiring initial review or classification

Comments

@petermsouzajr
Copy link
Owner

Describe the contribution

Use command: "test:sanity": "node --experimental-vm-modules node_modules/.bin/jest --testNamePattern='\[sanity\]'",

Tasks:

  1. Configuration Check:

    • Verify that the project is correctly configured using isProjectConfigured.
    • Ensure the proper resolution of the post-install script path.
  2. Command-Line Interface (CLI):

    • Test that the CLI correctly parses the framework argument (e.g., cypress, playwright).
    • Validate that the CLI recognizes and handles the todays-report and monthly-summary commands.
    • Ensure that the CLI correctly processes optional flags (--csv, --duplicate).
    • Verify that the help message (--help) displays correctly.
  3. Google Sheets Configuration:

    • Verify that the script checks for the presence of Google Sheets configuration (GOOGLE_KEYFILE_PATH, GOOGLE_SHEET_ID).
    • Ensure the appropriate handling when Google Sheets configuration is missing (default to CSV).
  4. Post-Install Script Execution:

    • Test the execution of the post-install script if the project is not configured.
    • Validate the handling of errors during the execution of the post-install script.
  5. Daily Report Generation:

    • Verify that the handleDailyReport function is called with the correct options when the todays-report command is issued.
    • Ensure that errors during daily report generation are handled gracefully.
  6. Monthly Summary Generation:

    • Verify that the handleSummary function is called with the correct options when the monthly-summary command is issued.
    • Ensure that errors during monthly summary generation are handled gracefully.
    • Test that CSV output for monthly summaries is not supported and returns the correct error message.
  7. Main Function Execution:

    • Validate that the main function is called with the correct options when no specific command is issued.
    • Ensure that errors during the main function execution are handled gracefully.

Type of contribution

✨ Feature

Current behavior (if applicable)

No response

Suggested solution and implementation (if applicable)

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@github-actions github-actions bot added the needs triage Label for identifying issues requiring initial review or classification label Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Label for identifying issues requiring initial review or classification
Projects
None yet
Development

No branches or pull requests

1 participant