Skip to content

Commit

Permalink
chore(common,notifications): update os_detect to 2.0.2 (#5569)
Browse files Browse the repository at this point in the history
* chore(common,notifications): update os_detect to version 2.0.2
  • Loading branch information
tyllark authored and Equartey committed Oct 22, 2024
1 parent 37c81dd commit aaa5755
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/aws_common/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
logging: ^1.0.0
meta: ^1.7.0
mime: ^1.0.0
os_detect: ^2.0.0
os_detect: ^2.0.2
path: ">=1.8.0 <2.0.0"
stream_transform: ^2.0.0
uuid: ">=3.0.6 <5.0.0"
Expand Down
18 changes: 9 additions & 9 deletions packages/aws_common/test/config/file_location_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void main() {
r'User home is loaded from $HOME with highest priority on non-windows platforms.',
() {
overrideOperatingSystem(
const OperatingSystem('linux', ''),
OperatingSystem('linux', ''),
() {
overrideEnvironment(
{
Expand Down Expand Up @@ -42,7 +42,7 @@ void main() {
r'User home is loaded from $HOME with highest priority on windows platforms.',
() {
overrideOperatingSystem(
const OperatingSystem('windows', ''),
OperatingSystem('windows', ''),
() {
overrideEnvironment(
{
Expand Down Expand Up @@ -70,7 +70,7 @@ void main() {
r'User home is loaded from $USERPROFILE on windows platforms when $HOME is not set.',
() {
overrideOperatingSystem(
const OperatingSystem('windows', ''),
OperatingSystem('windows', ''),
() {
overrideEnvironment(
{
Expand All @@ -97,7 +97,7 @@ void main() {
r'User home is loaded from $HOMEDRIVE$HOMEPATH on windows platforms when $HOME and $USERPROFILE are not set.',
() {
overrideOperatingSystem(
const OperatingSystem('windows', ''),
OperatingSystem('windows', ''),
() {
overrideEnvironment(
{
Expand All @@ -123,7 +123,7 @@ void main() {
r'The default config location can be overridden by the user on non-windows platforms.',
() {
overrideOperatingSystem(
const OperatingSystem('linux', ''),
OperatingSystem('linux', ''),
() {
overrideEnvironment(
{
Expand All @@ -149,7 +149,7 @@ void main() {
r'The default credentials location can be overridden by the user on non-windows platforms.',
() {
overrideOperatingSystem(
const OperatingSystem('linux', ''),
OperatingSystem('linux', ''),
() {
overrideEnvironment(
{
Expand All @@ -175,7 +175,7 @@ void main() {
r'The default credentials location can be overridden by the user on windows platforms.',
() {
overrideOperatingSystem(
const OperatingSystem('windows', ''),
OperatingSystem('windows', ''),
() {
overrideEnvironment(
{
Expand All @@ -201,7 +201,7 @@ void main() {
r'The default credentials location can be overridden by the user on windows platforms.',
() {
overrideOperatingSystem(
const OperatingSystem('windows', ''),
OperatingSystem('windows', ''),
() {
overrideEnvironment(
{
Expand All @@ -226,7 +226,7 @@ void main() {
test(r'The default profile can be overridden via environment variable.',
() {
overrideOperatingSystem(
const OperatingSystem('linux', ''),
OperatingSystem('linux', ''),
() {
overrideEnvironment(
{
Expand Down
2 changes: 1 addition & 1 deletion packages/aws_common/tool/generate_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void main() {
output.writeln(
'''
test(r'${test.name}', () {
overrideOperatingSystem(const OperatingSystem('${test.platform.name}', ''), () {
overrideOperatingSystem(OperatingSystem('${test.platform.name}', ''), () {
overrideEnvironment({
${test.environment.entries.map((entry) => "'${entry.key}': r'${entry.value}',").join('\n')}
}, () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
flutter:
sdk: flutter
flutter_plugin_android_lifecycle: ^2.0.9
os_detect: ^2.0.0
os_detect: ^2.0.2
shared_preferences: ^2.0.15

dev_dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void main() {

test('should register background processor on Android', () async {
await overrideOperatingSystem(
const OperatingSystem('android', ''),
OperatingSystem('android', ''),
() async {
when(mockPushNotificationsHostApi.getLaunchNotification()).thenAnswer(
(_) async => standardAndroidPushMessage.cast(),
Expand Down Expand Up @@ -254,7 +254,7 @@ void main() {
);

overrideOperatingSystem(
const OperatingSystem('ios', ''),
OperatingSystem('ios', ''),
() {
expect(
() async => plugin.setBadgeCount(42),
Expand Down Expand Up @@ -388,7 +388,7 @@ void main() {
});
test('getBadgeCount returns a badge count', () async {
await overrideOperatingSystem(
const OperatingSystem('ios', ''),
OperatingSystem('ios', ''),
() async {
plugin = TestAmplifyPushNotifications(
serviceProviderClient: mockServiceProviderClient,
Expand All @@ -415,7 +415,7 @@ void main() {

test('setBadgeCount calls the native layer to set', () async {
await overrideOperatingSystem(
const OperatingSystem('ios', ''),
OperatingSystem('ios', ''),
() async {
plugin = TestAmplifyPushNotifications(
serviceProviderClient: mockServiceProviderClient,
Expand Down Expand Up @@ -487,7 +487,7 @@ void main() {
'onNotificationReceivedInBackground throws an Exception when the given callback function is not top-level or static',
() async {
overrideOperatingSystem(
const OperatingSystem('android', ''),
OperatingSystem('android', ''),
() {
plugin = TestAmplifyPushNotifications(
serviceProviderClient: mockServiceProviderClient,
Expand All @@ -514,7 +514,7 @@ void main() {
'onNotificationReceivedInBackground should register a top-level or static callback function',
() async {
await overrideOperatingSystem(
const OperatingSystem('android', ''),
OperatingSystem('android', ''),
() async {
SharedPreferences.setMockInitialValues({});
final pref = await SharedPreferences.getInstance();
Expand All @@ -534,7 +534,7 @@ void main() {
test('onNotificationReceivedInBackground should accept the callback on iOS',
() async {
overrideOperatingSystem(
const OperatingSystem('ios', ''),
OperatingSystem('ios', ''),
() {
void localiOScallback(testGlobalCallbackFunction) {}
plugin = TestAmplifyPushNotifications(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void main() {
'should invoke the top-level or static external callback function on Android',
() async {
await overrideOperatingSystem(
const OperatingSystem('android', ''),
OperatingSystem('android', ''),
() async {
final pref = await SharedPreferences.getInstance();
TestAmplifyPushNotifications(
Expand Down

0 comments on commit aaa5755

Please sign in to comment.