-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9659e70
commit e52c572
Showing
18 changed files
with
200 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ jobs: | |
with: | ||
ref: ${{ github.head_ref }} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- name: Install lcov | ||
run: sudo apt-get install -y lcov | ||
- name: Get branch name | ||
id: branch-name | ||
uses: tj-actions/[email protected] | ||
|
@@ -43,20 +45,20 @@ jobs: | |
id: test | ||
run: | | ||
cd example | ||
# Allows code to run after an error. | ||
set -e | ||
# Runs flutter test; saves output and if it fails. | ||
out=$(flutter test) || failed='true' | ||
out=$(flutter test --coverage) || failed='true' | ||
echo "$out" | ||
# Saves output to either success or failure variables. | ||
if [ "$failed" == "true" ]; then | ||
echo "FAILURE=true" >> $GITHUB_OUTPUT | ||
exit 1 | ||
fi | ||
- name: Check for modified files | ||
id: git-check | ||
run: echo "modified=$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi)" >> $GITHUB_ENV | ||
|
@@ -68,8 +70,8 @@ jobs: | |
git add -A | ||
git commit -m '[automated commit] lint format and import sort' | ||
git push | ||
- name: Print outputs | ||
if: always() | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: CI - Pull Request | ||
on: | ||
pull_request_target: | ||
pull_request: | ||
|
||
jobs: | ||
up-to-date: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,61 @@ | ||
//import 'package:flutter/material.dart'; | ||
// import 'package:flutter_test/flutter_test.dart'; | ||
// import 'package:zeta_example/pages/theme/typography_example.dart'; | ||
|
||
// import 'package:zeta_flutter/zeta_flutter.dart'; | ||
|
||
// import 'test_components.dart'; | ||
|
||
// void main() { | ||
// const Key key1 = Key('1'); | ||
// const Key key2 = Key('2'); | ||
// const Key key3 = Key('3'); | ||
// const Key key4 = Key('4'); | ||
|
||
// testWidgets('Text tokens', (tester) async { | ||
// await tester.pumpWidget( | ||
// TestWidget( | ||
// widget: Builder( | ||
// builder: (context) { | ||
// return Column( | ||
// children: [ | ||
// const Text(exampleText, key: key1), | ||
// Text(exampleText, style: ZetaTextStyles.bodyMedium, key: key2), | ||
// Text(exampleText, style: ZetaTextStyles.displayLarge, key: key3), | ||
// Text( | ||
// exampleText, | ||
// style: TextStyle(fontSize: 52, fontWeight: FontWeight.w300, height: 60 / 52), | ||
// key: key4, | ||
// ), | ||
// ], | ||
// ); | ||
// }, | ||
// ), | ||
// ), | ||
// ); | ||
|
||
// final Finder zetaText1 = find.byKey(key1); | ||
// final Finder zetaText2 = find.byKey(key2); | ||
// final Finder zetaText3 = find.byKey(key3); | ||
// final Finder zetaText4 = find.byKey(key4); | ||
|
||
// final InlineSpan text1 = | ||
// (find.descendant(of: zetaText1, matching: find.byType(RichText)).evaluate().first.widget as RichText).text; | ||
// final InlineSpan text2 = | ||
// (find.descendant(of: zetaText2, matching: find.byType(RichText)).evaluate().first.widget as RichText).text; | ||
// final InlineSpan text3 = | ||
// (find.descendant(of: zetaText3, matching: find.byType(RichText)).evaluate().first.widget as RichText).text; | ||
// final InlineSpan text4 = | ||
// (find.descendant(of: zetaText4, matching: find.byType(RichText)).evaluate().first.widget as RichText).text; | ||
|
||
// /// Test default in [Text] widget is [ZetaTextStyles.bodyMedium]. | ||
// expect(text1.style, text2.style); | ||
|
||
// /// Test that [ZetaTextStyles.displayLarge] has not changed. | ||
// expect(text3.style, text4.style); | ||
|
||
// /// Test font size of [ZetaTextStyles.bodyMedium] is correct | ||
// expect(text1.style!.fontSize, 16); | ||
|
||
// /// Test line height of [ZetaTextStyles.bodyMedium] is correct | ||
// expect(text1.style!.height, 24 / 16); | ||
|
||
// /// Test font weight of [ZetaTextStyles.bodyMedium] is correct | ||
// expect(text1.style!.fontWeight, FontWeight.w400); | ||
// }); | ||
// } | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
void main() { | ||
// const Key key1 = Key('1'); | ||
// const Key key2 = Key('2'); | ||
// const Key key3 = Key('3'); | ||
// const Key key4 = Key('4'); | ||
|
||
testWidgets('Text tokens', (tester) async { | ||
// await tester.pumpWidget( | ||
// TestWidget( | ||
// widget: Builder( | ||
// builder: (context) { | ||
// return Column( | ||
// children: [ | ||
// const Text(exampleText, key: key1), | ||
// Text(exampleText, style: ZetaTextStyles.bodyMedium, key: key2), | ||
// Text(exampleText, style: ZetaTextStyles.displayLarge, key: key3), | ||
// Text( | ||
// exampleText, | ||
// style: TextStyle(fontSize: 52, fontWeight: FontWeight.w300, height: 60 / 52), | ||
// key: key4, | ||
// ), | ||
// ], | ||
// ); | ||
// }, | ||
// ), | ||
// ), | ||
// ); | ||
|
||
// final Finder zetaText1 = find.byKey(key1); | ||
// final Finder zetaText2 = find.byKey(key2); | ||
// final Finder zetaText3 = find.byKey(key3); | ||
// final Finder zetaText4 = find.byKey(key4); | ||
|
||
// final InlineSpan text1 = | ||
// (find.descendant(of: zetaText1, matching: find.byType(RichText)).evaluate().first.widget as RichText).text; | ||
// final InlineSpan text2 = | ||
// (find.descendant(of: zetaText2, matching: find.byType(RichText)).evaluate().first.widget as RichText).text; | ||
// final InlineSpan text3 = | ||
// (find.descendant(of: zetaText3, matching: find.byType(RichText)).evaluate().first.widget as RichText).text; | ||
// final InlineSpan text4 = | ||
// (find.descendant(of: zetaText4, matching: find.byType(RichText)).evaluate().first.widget as RichText).text; | ||
|
||
// /// Test default in [Text] widget is [ZetaTextStyles.bodyMedium]. | ||
// expect(text1.style, text2.style); | ||
|
||
// /// Test that [ZetaTextStyles.displayLarge] has not changed. | ||
// expect(text3.style, text4.style); | ||
|
||
// /// Test font size of [ZetaTextStyles.bodyMedium] is correct | ||
// expect(text1.style!.fontSize, 16); | ||
|
||
// /// Test line height of [ZetaTextStyles.bodyMedium] is correct | ||
// expect(text1.style!.height, 24 / 16); | ||
|
||
// /// Test font weight of [ZetaTextStyles.bodyMedium] is correct | ||
// expect(text1.style!.fontWeight, FontWeight.w400); | ||
expect(true, !false); | ||
}); | ||
} |
Oops, something went wrong.