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

chore: adr in code and junit5 parameterized tests (WPB-10396) #3288

Merged
merged 27 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
994ed4f
doc: add adr
yamilmedina Aug 5, 2024
ed91888
doc: add lib param tests
yamilmedina Aug 5, 2024
550146a
Merge branch 'develop' into chore/adr-and-tests
yamilmedina Aug 5, 2024
516a7f5
chore: add param tests
yamilmedina Aug 5, 2024
b0c5def
chore: add param tests
yamilmedina Aug 5, 2024
6bcd8cf
chore: add param tests
yamilmedina Aug 5, 2024
19a7f70
Revert "chore: add param tests"
yamilmedina Aug 5, 2024
2be9995
chore: generate docs
yamilmedina Aug 6, 2024
dea2139
chore: generate docs
yamilmedina Aug 6, 2024
ce89d5a
chore: manual cherrypick
yamilmedina Aug 6, 2024
8a57160
chore:action
yamilmedina Aug 6, 2024
6c3c607
chore: adrstatus
yamilmedina Aug 6, 2024
e1c2654
chore: adrstatus, fix ref
yamilmedina Aug 6, 2024
9efcfed
chore: adrstatus, fix action
yamilmedina Aug 6, 2024
5d99719
chore: adrstatus, fix action
yamilmedina Aug 6, 2024
55621b4
chore: adrstatus, fix action
yamilmedina Aug 6, 2024
0c617bd
chore: adrstatus, fix action
yamilmedina Aug 6, 2024
7edaedb
chore: empty commit bump
yamilmedina Aug 6, 2024
9a347fb
chore: empty commit bump
yamilmedina Aug 6, 2024
bff9043
chore: empty commit bump
yamilmedina Aug 6, 2024
9632b4a
Merge branch 'develop' into chore/adr-and-tests
yamilmedina Aug 6, 2024
bd90e24
chore: adrstatus, fix action
yamilmedina Aug 6, 2024
93be52e
chore: adrstatus, fix action
yamilmedina Aug 6, 2024
8f23e70
chore: adrstatus, fix action
yamilmedina Aug 6, 2024
92a0bda
chore: adrstatus, fix action
yamilmedina Aug 6, 2024
dfb29f6
Merge branch 'develop' into chore/adr-and-tests
yamilmedina Aug 9, 2024
58b4464
Merge branch 'develop' into chore/adr-and-tests
yamilmedina Aug 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: add adr
  • Loading branch information
yamilmedina committed Aug 5, 2024
commit 994ed4fbebc986903860c6c38c6890b3d5e8a495
7 changes: 6 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,13 @@ android {
}
}
}

val sharedTestDir = file("src/sharedTest/kotlin")
getByName("androidTest") {
java.srcDirs("src/androidTest/kotlin")
java.srcDirs("src/androidTest/kotlin", sharedTestDir)
}
getByName("test") {
java.srcDirs("src/test/kotlin", sharedTestDir)
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions doc/adr/0000-template-lightway-adr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Decision record template by Michael Nygard

This is the template in [Documenting architecture decisions - Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
You can use [adr-tools](https://github.com/npryce/adr-tools) for managing the ADR files.

In each ADR file, write these sections:

# Title

## Status

What is the status, such as proposed, accepted, rejected, deprecated, superseded, etc.?

## Context

What is the issue that we're seeing that is motivating this decision or change?

## Decision

What is the change that we're proposing and/or doing?

## Consequences

What becomes easier or more difficult to do because of this change?
26 changes: 26 additions & 0 deletions doc/adr/0001-record-architecture-decisions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 1. Record architecture decisions

Date: 2024-08-05

## Status

Accepted

## Context

We agreed in the past to use ADR's, but we lost track of it as we were using confluence to keep
them. This concern was raised in the last collective, and we need to decide how to proceed.

## Decision

We will use Architecture Decision Records in the code and as part of the review process.
We will use the [Lightway ADR template](0000-template-lightway-adr.md) to keep the ADRs simple and
easy to maintain.

## Consequences

- We need to add a new folder to the repository, `doc/adr`, to keep the architecture decision
records.
- Whenever a new refactoring or library is introduced, a new ADR should be created.
- You can always request in the Pull request review process to add a new ADR, if you think it's
necessary.
31 changes: 31 additions & 0 deletions doc/adr/0002-calling-activities-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 2. Calling activity refactor

Date: 2024-08-01

## Status

Accepted

## Context

To support a second incoming call we need to refactor the code so we can handle the ongoing content
context, without losing the current context.

This is a retroactive decision record implemented
on https://github.com/wireapp/wire-android/pull/3264

## Decision

Create 2 separate activities, one for the Incoming/Outgoing calls and another for the ongoing call.
In this way, we can keep the context of the ongoing call and handle the incoming/outgoing calls.

The design and interaction will look like this:

<img src="https://github.com/user-attachments/assets/66f19cce-c2bc-4777-a0eb-b5cda035df8a"/>

## Consequences

- StartingActivity will handle Incoming and Outgoing calls content, these contents are disposable
and can be recreated when receiving a new call.
- OngoingCallActivity will handle the ongoing call content, this content is not disposable and
should be kept during the call.
21 changes: 21 additions & 0 deletions doc/adr/0003-introducing-junit5-parametrizable-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 3. Use parameterizable tests in JUnit5

Date: 2024-08-05

## Status

Proposed

## Context

Sometimes we need to write multiple tests for the same scenario, changing only the input values.

## Decision

We will use parameterizable tests in JUnit5 to avoid writing multiple tests for the same scenario.

## Consequences

- Introduction of `@ParameterizedTest` annotation in the test class
and [library](https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests).
- The test method will receive the parameters as arguments.