From 286d3b52e0e937d20964a3867e9f215f5360cdda Mon Sep 17 00:00:00 2001
From: luancurti <luancurti@gmail.com>
Date: Fri, 2 Dec 2022 09:32:22 -0300
Subject: [PATCH 1/2] chore(sonar): add github action to scan code

---
 .github/workflows/sonar-scan.yml | 22 ++++++++++++++++++++++
 sonar-project.properties         |  4 ++++
 2 files changed, 26 insertions(+)
 create mode 100644 .github/workflows/sonar-scan.yml
 create mode 100644 sonar-project.properties

diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml
new file mode 100644
index 00000000..a6880744
--- /dev/null
+++ b/.github/workflows/sonar-scan.yml
@@ -0,0 +1,22 @@
+name: Sonar Scan
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    types: [opened, synchronize, reopened]
+
+jobs:
+  sonarcloud:
+    name: SonarCloud
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
+      - name: SonarCloud Scan
+        uses: SonarSource/sonarcloud-github-action@master
+        env:
+          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}  # Needed to get PR information, if any
+          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 00000000..b38e4d53
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,4 @@
+sonar.organization=react-native-datetimepicker
+sonar.projectKey=react-native-datetimepicker_datetimepicker
+sonar.sources=src
+sonar.sourceEncoding=UTF-8

From c842c5450e7aac1897e363dacabd29073ba93ed5 Mon Sep 17 00:00:00 2001
From: luancurti <luancurti@gmail.com>
Date: Fri, 2 Dec 2022 10:09:55 -0300
Subject: [PATCH 2/2] test(android): increase time to expect
 getDatePickerAndroid to exist

---
 example/e2e/detoxTest.spec.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/example/e2e/detoxTest.spec.js b/example/e2e/detoxTest.spec.js
index feb78dd2..55a7f7f1 100644
--- a/example/e2e/detoxTest.spec.js
+++ b/example/e2e/detoxTest.spec.js
@@ -250,7 +250,6 @@ describe('e2e tests', () => {
 
   it(':android: when component unmounts, dialog is dismissed', async () => {
     await elementById('showAndDismissPickerButton').tap();
-    await wait(1000);
     await expect(getDatePickerAndroid()).toExist();
     await wait(6000);