Skip to content

Commit

Permalink
Includes minor changes and removal of pull_request_target triggers to…
Browse files Browse the repository at this point in the history
… set things up to be ready for testing uploads of comments with Fork PRs
  • Loading branch information
Rd4dev committed Aug 17, 2024
1 parent 1c1531d commit f7552b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,14 @@

name: Code Coverage

on:
workflow_dispatch:
pull_request_target:
types: [ opened, synchronize, reopened ]


# Controls when the action will run. Triggers the workflow on pull request
# events or push events in the develop branch.
#on:
# pull_request_target:
# types: [opened, synchronize, reopened]
#on:
# pull_request:
# push:
# branches:
# # Push events on develop branch
# - develop
on:
pull_request:
push:
branches:
# Push events on develop branch
- develop

permissions:
pull-requests: write
Expand Down Expand Up @@ -327,7 +318,6 @@ jobs:

# The expression if: ${{ !cancelled() }} runs a job or step regardless of its success or failure while responding to cancellations,
# serving as a cancellation-compliant alternative to if: ${{ always() }} in concurrent workflows.
# if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Download Generated Markdown Report
Expand Down
6 changes: 3 additions & 3 deletions wiki/Writing-tests-with-good-behavioural-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Consider a function that manages a food order process. This function does the fo

1. Lists the food items.
2. Calculates the total price.
3. Display the order.
3. Displays the order.
4. Checks if the payment has been made and provides the corresponding message.

```kotlin
Expand Down Expand Up @@ -211,7 +211,7 @@ fun testProcessOrder_allSteps_returnsCorrectMessage() {
**Difficulties in Testing All Aspects Together:**

- Complex Failure Diagnosis: If this test fails, you need to diagnose whether the issue lies in listing items, calculating the total, displaying the order, or payment status.
- Less Focused: It does not target individual aspects of the function, making it harder to identify which specific action failed.
- Less Focused: It does not target individual aspects of the function, making it harder to identify which specific action failed for cases when the test overall is failing.

### Testing Specific Aspects

Expand Down Expand Up @@ -1175,7 +1175,7 @@ fun createDiscount(): Triple<Boolean, String, YearQuarter> {
}

@Test
fun testDiscountedBill_withHelper() {
fun testDiscountedBill_withCreateDiscountHelper_returnsDiscountedBill() {
val restaurant = createRestaurantWithMenu()
val discountDetails = createDiscount()

Expand Down

0 comments on commit f7552b3

Please sign in to comment.