Skip to content

Commit

Permalink
Merge branch 'feat/1412-yesNoChoiceComponent' of github.com:input-out…
Browse files Browse the repository at this point in the history
…put-hk/catalyst-voices into feat/1412-yesNoChoiceComponent
  • Loading branch information
LynxLynxx committed Jan 13, 2025
2 parents 07803cb + 7226399 commit 96f222c
Show file tree
Hide file tree
Showing 59 changed files with 3,516 additions and 1,016 deletions.
2 changes: 2 additions & 0 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ bimap
bindgen
bkioshn
bluefireteam
bridgefor
BROTLI
canvaskit
cardano
Expand Down Expand Up @@ -105,6 +106,7 @@ fmtfix
fontawesome
fontello
Formz
frbgen
fuzzer
gapless
gcloud
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,8 @@ test-results/
/playwright/.cache/
extensions/
browser_extensions/
!catalyst_voices/packages/internal/catalyst_voices_driver/lib/src/extensions/
!catalyst_voices/packages/internal/catalyst_voices_driver/lib/src/extensions/

#Test report and coverage
*.junit-report.xml
*.coverage.info
3 changes: 2 additions & 1 deletion .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
"ignores": [
".config/dictionaries/**",
"catalyst-gateway/target/**",
"CHANGELOG.md",
"catalyst_voices/CHANGELOG.md",
"catalyst_voices/packages/libs/**/CHANGELOG.md",
"catalyst_voices/packages/libs/**/cargokit/**",
"catalyst_voices/apps/voices/macos/Pods/**",
"catalyst_voices/apps/voices/ios/Pods/**",
"**/node_modules/**",
"**/.dart_tool/**"
],
Expand Down
Empty file removed Overall,
Empty file.
4 changes: 2 additions & 2 deletions catalyst-gateway/tests/schemathesis_tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__pycache__
junit-report.xml
.hypothesis/
.hypothesis/
cassette.yaml
24 changes: 16 additions & 8 deletions catalyst-gateway/tests/schemathesis_tests/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@ VERSION 0.8
package-schemathesis:
FROM python:3.12-alpine3.20
# TODO: https://github.com/input-output-hk/catalyst-voices/issues/465
ARG openapi_spec
# optional argument that can be used to pass a --hypothesis-seed to replicate specific test failures
ARG seed
ARG version=3.39.5

RUN apk add --no-cache gcc musl-dev
RUN python -m pip install schemathesis==3.27.1
RUN python -m pip install schemathesis==$version
RUN mkdir /results
COPY ./hooks/hooks.py .
VOLUME /results
ARG openapi_spec
# optional argument that can be used to pass a --hypothesis-seed to replicate specific test failures
ARG seed
ENTRYPOINT st run --endpoint '^/api/v1/health' $openapi_spec \
ENTRYPOINT st run --include-path-regex '^/api/v1/health/' \
--exclude-path '/api/v1/health/inspection' \ #excluding since this is a internal debug endpoint
$openapi_spec \
--workers=2 \
--wait-for-schema=120 \
--max-response-time=5000 \
--hypothesis-max-examples=1000 \
--data-generation-method=all \
--skip-deprecated-operations \
--exclude-deprecated \
--force-schema-version=30 \
--show-trace \
--force-color \
Expand All @@ -31,7 +35,7 @@ package-schemathesis:
# test-fuzzer-api - Fuzzy test cat-gateway using openapi specs.
test-fuzzer-api:
FROM earthly/dind:alpine-3.19-docker-25.0.5-r0
RUN apk update && apk add iptables-legacy # workaround for https://github.com/earthly/earthly/issues/3784
RUN apk update && apk add iptables-legacy curl # workaround for https://github.com/earthly/earthly/issues/3784
COPY schemathesis-docker-compose.yml .
LET OPENAPI_SPEC="http://0.0.0.0:3030/docs/cat-gateway.json"
ARG seed
Expand All @@ -45,11 +49,15 @@ test-fuzzer-api:
--service cat-gateway \
--allow-privileged

RUN docker run --net=host --name=st schemathesis:latest && \
RUN docker run --net=host --name=st schemathesis:latest || echo fail > fail; \
docker cp st:/results/junit-report.xml junit-report.xml && \
docker cp st:/results/cassette.yaml cassette.yaml
END
WAIT
SAVE ARTIFACT junit-report.xml AS LOCAL schemathesis.junit-report.xml
SAVE ARTIFACT cassette.yaml AS LOCAL cassette.yaml
END
IF [ -f fail ]
RUN --no-cache echo "Schemathesis test failed. Check the logs for more details" && \
exit 1
END
79 changes: 70 additions & 9 deletions catalyst_voices/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,55 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2025-01-13

### Changes

---

Packages with breaking changes:

* There are no breaking changes in this release.

Packages with other changes:

* [`catalyst_cardano` - `v0.4.0+3`](#catalyst_cardano---v0403)
* [`catalyst_key_derivation` - `v0.1.2`](#catalyst_key_derivation---v012)
* `catalyst_cardano_serialization` - `v0.5.0+3`
* `catalyst_cardano_web` - `v0.4.0+3`
* `catalyst_cardano_platform_interface` - `v0.4.0+3`

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes.
> Their versions have been incremented to bump the minimum dependency versions of the packages
> they depend upon in this project.
* `catalyst_cardano_serialization` - `v0.5.0+3`
* `catalyst_cardano_web` - `v0.4.0+3`
* `catalyst_cardano_platform_interface` - `v0.4.0+3`

---

#### `catalyst_cardano` - `v0.4.0+3`

* **FIX**(general): Update cat-ci to latest version to bring in doc test fixes and latest
rust compiler ([#1462](https://github.com/input-output-hk/catalyst-voices/issues/1462)).
([6ddc4c5e](https://github.com/input-output-hk/catalyst-voices/commit/6ddc4c5ea6e5e93a0042e188982505ba25cccf76))

#### `catalyst_key_derivation` - `v0.1.2`

* **FIX**(general): Update cat-ci to latest version to bring in doc test fixes and latest
rust compiler ([#1462](https://github.com/input-output-hk/catalyst-voices/issues/1462)).
([6ddc4c5e](https://github.com/input-output-hk/catalyst-voices/commit/6ddc4c5ea6e5e93a0042e188982505ba25cccf76))
* **FIX**: add missing dependency.
([1334cb06](https://github.com/input-output-hk/catalyst-voices/commit/1334cb066877b2507af2e469f31b6c3549181146))
* **FEAT**(cat-voices): Enable the 'arithmetic_side_effects' Clippy lint
([#1456](https://github.com/input-output-hk/catalyst-voices/issues/1456)).
([5a0e2f46](https://github.com/input-output-hk/catalyst-voices/commit/5a0e2f46859b44ff325d47ca0eb90d4fa904d125))
* **DOCS**: update pub.dev topics for catalyst_key_derivation package.
([a6d9bcfa](https://github.com/input-output-hk/catalyst-voices/commit/a6d9bcfa451cbb8d0ded9659e63fbfa290416480))

## 2025-01-02v2

### Changes
Expand All @@ -16,14 +65,18 @@ Packages with breaking changes:
Packages with other changes:

* [Change Log](#change-log)
* [2025-01-02v2](#2025-01-02v2)
* [2025-01-13](#2025-01-13)
* [Changes](#changes)
* [`catalyst_cardano` - `v0.4.0+3`](#catalyst_cardano---v0403)
* [`catalyst_key_derivation` - `v0.1.2`](#catalyst_key_derivation---v012)
* [2025-01-02v2](#2025-01-02v2)
* [Changes](#changes-1)
* [`catalyst_key_derivation` - `v0.1.1+1`](#catalyst_key_derivation---v0111)
* [2025-01-02v1](#2025-01-02v1)
* [Changes](#changes-1)
* [Changes](#changes-2)
* [`catalyst_key_derivation` - `v0.1.1`](#catalyst_key_derivation---v011)
* [2025-01-02](#2025-01-02)
* [Changes](#changes-2)
* [Changes](#changes-3)
* [`catalyst_cardano` - `v0.4.0`](#catalyst_cardano---v040)
* [`catalyst_cardano_platform_interface` - `v0.4.0`](#catalyst_cardano_platform_interface---v040)
* [`catalyst_cardano_serialization` - `v0.5.0`](#catalyst_cardano_serialization---v050)
Expand Down Expand Up @@ -64,14 +117,18 @@ Packages with breaking changes:
Packages with other changes:

* [Change Log](#change-log)
* [2025-01-02v2](#2025-01-02v2)
* [2025-01-13](#2025-01-13)
* [Changes](#changes)
* [`catalyst_cardano` - `v0.4.0+3`](#catalyst_cardano---v0403)
* [`catalyst_key_derivation` - `v0.1.2`](#catalyst_key_derivation---v012)
* [2025-01-02v2](#2025-01-02v2)
* [Changes](#changes-1)
* [`catalyst_key_derivation` - `v0.1.1+1`](#catalyst_key_derivation---v0111)
* [2025-01-02v1](#2025-01-02v1)
* [Changes](#changes-1)
* [Changes](#changes-2)
* [`catalyst_key_derivation` - `v0.1.1`](#catalyst_key_derivation---v011)
* [2025-01-02](#2025-01-02)
* [Changes](#changes-2)
* [Changes](#changes-3)
* [`catalyst_cardano` - `v0.4.0`](#catalyst_cardano---v040)
* [`catalyst_cardano_platform_interface` - `v0.4.0`](#catalyst_cardano_platform_interface---v040)
* [`catalyst_cardano_serialization` - `v0.5.0`](#catalyst_cardano_serialization---v050)
Expand Down Expand Up @@ -121,14 +178,18 @@ Packages with breaking changes:
Packages with other changes:

* [Change Log](#change-log)
* [2025-01-02v2](#2025-01-02v2)
* [2025-01-13](#2025-01-13)
* [Changes](#changes)
* [`catalyst_cardano` - `v0.4.0+3`](#catalyst_cardano---v0403)
* [`catalyst_key_derivation` - `v0.1.2`](#catalyst_key_derivation---v012)
* [2025-01-02v2](#2025-01-02v2)
* [Changes](#changes-1)
* [`catalyst_key_derivation` - `v0.1.1+1`](#catalyst_key_derivation---v0111)
* [2025-01-02v1](#2025-01-02v1)
* [Changes](#changes-1)
* [Changes](#changes-2)
* [`catalyst_key_derivation` - `v0.1.1`](#catalyst_key_derivation---v011)
* [2025-01-02](#2025-01-02)
* [Changes](#changes-2)
* [Changes](#changes-3)
* [`catalyst_cardano` - `v0.4.0`](#catalyst_cardano---v040)
* [`catalyst_cardano_platform_interface` - `v0.4.0`](#catalyst_cardano_platform_interface---v040)
* [`catalyst_cardano_serialization` - `v0.5.0`](#catalyst_cardano_serialization---v050)
Expand Down
3 changes: 2 additions & 1 deletion catalyst_voices/apps/voices/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if (keystorePropertiesFile.exists()) {

android {
compileSdkVersion flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -46,7 +47,7 @@ android {

defaultConfig {
applicationId "io.projectcatalyst.catalyst_voices"
minSdkVersion flutter.minSdkVersion
minSdkVersion 23 // required by super_native_extensions
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
2 changes: 2 additions & 0 deletions catalyst_voices/apps/voices/integration_test/all_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:catalyst_voices/configs/bootstrap.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';

import 'suites/account_test.dart' as account_test;
import 'suites/app_test.dart' as app_test;
import 'suites/onboarding_test.dart' as onboarding_test;

Expand All @@ -14,4 +15,5 @@ void main() async {

app_test.main();
onboarding_test.main();
account_test.main();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:patrol_finders/patrol_finders.dart';

import '../utils/translations_utils.dart';

class AccountDropdownPage {
static const popUpMenuAccountHeader = Key('PopUpMenuAccountHeader');
static const popUpMenuMyAccount = Key('PopUpMenuMyAccount');
static const popUpMenuProfileAndKeychain = Key('PopUpMenuProfileAndKeychain');
static const popUpMenuLock = Key('PopUpMenuLockAccount');

static Future<void> accountDropdownContainsSpecificData(
PatrolTester $,
) async {
expect(
$(popUpMenuAccountHeader).$(Expanded).$(Text).text?.isNotEmpty,
true,
reason: 'The wallet name should not be an empty string.',
);
expect(
$(popUpMenuAccountHeader).$(Expanded).$(Text).at(1).text?.contains('₳'),
true,
reason: 'The account balance should contain the symbol ₳.',
);
expect(
$(popUpMenuMyAccount).$(Text).text,
T.get('My account'),
);
expect(
$(popUpMenuProfileAndKeychain).$(Text).text,
T.get('Profile & Keychain'),
);
expect($(popUpMenuLock).$(Text).text, T.get('Lock account'));
}

static Future<void> accountDropdownLooksAsExpected(
PatrolTester $,
) async {
expect($(popUpMenuAccountHeader), findsOneWidget);
expect($(popUpMenuMyAccount), findsOneWidget);
expect($(popUpMenuProfileAndKeychain), findsOneWidget);
expect($(popUpMenuLock), findsOneWidget);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import 'package:flutter/material.dart';
class AppBarPage {
static const spacesDrawerButton = Key('DrawerButton');
static const getStartedBtn = Key('GetStartedButton');
static const accountPopupBtn = Key('AccountPopupButton');
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import 'package:catalyst_voices/app/view/app.dart';
import 'package:catalyst_voices/configs/bootstrap.dart';
import 'package:catalyst_voices/routes/routes.dart';
import 'package:catalyst_voices_models/catalyst_voices_models.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:go_router/go_router.dart';
import 'package:patrol_finders/patrol_finders.dart';

import '../pageobject/account_dropdown_page.dart';
import '../pageobject/app_bar_page.dart';
import '../pageobject/overall_spaces_page.dart';

void main() async {
late final GoRouter router;

setUpAll(() async {
router = buildAppRouter();
});

setUp(() async {
await registerDependencies(config: const AppConfig());
router.go(const DiscoveryRoute().location);
});

tearDown(() async {
await restartDependencies();
});

group(
'Account dropdown -',
() {
patrolWidgetTest(
'user - Account dropdown button opens account dropdown',
(PatrolTester $) async {
await $.pumpWidgetAndSettle(App(routerConfig: router));
await $(OverallSpacesPage.userShortcutBtn)
.tap(settleTimeout: const Duration(seconds: 10));
await $(AppBarPage.accountPopupBtn).tap();
await AccountDropdownPage.accountDropdownLooksAsExpected($);
await AccountDropdownPage.accountDropdownContainsSpecificData($);
},
);
},
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ void main() async {

patrolWidgetTest(
'guest - chooser - clicking on icons works correctly',
tags: 'https://github.com/input-output-hk/catalyst-voices/issues/1473',
skip: true,
(PatrolTester $) async {
await $.pumpWidgetAndSettle(App(routerConfig: router));
await $(OverallSpacesPage.guestShortcutBtn)
Expand All @@ -58,6 +60,8 @@ void main() async {
);

patrolWidgetTest(
tags: 'https://github.com/input-output-hk/catalyst-voices/issues/1473',
skip: true,
'guest - chooser - next,previous buttons work correctly',
(PatrolTester $) async {
await $.pumpWidgetAndSettle(App(routerConfig: router));
Expand Down
Loading

0 comments on commit 96f222c

Please sign in to comment.