Skip to content

Commit

Permalink
e2e(maestro): added testID to homebutton and finished first flow (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
arenault-pass authored Mar 8, 2024
1 parent 886d20b commit 297c67f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .maestro/launchGame.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
appId: com.axe.l.r.drinkup
---
- launchApp
- tapOn: "drinkup on MBP-de-Axel"
- tapOn: "drinkup on MacBook-Pro-de-Axel.local"
- tapOn: "LANCER LA PARTIE"

- assertVisible: "LOBBY"
Expand All @@ -28,4 +28,6 @@ appId: com.axe.l.r.drinkup
commands:
- tapOn: "TOUR SUIVANT"

- tapOn:
id: "homeButton"
- stopApp
2 changes: 1 addition & 1 deletion screens/Endscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Endscreen() {
className="absolute left-8"
onPress={goToHomescreen}
>
<HomeIcon color="white" size="30" className="" />
<HomeIcon color="white" size="30" className="" testID="homeButton" />
</TouchableOpacity>
<Text className="text-white absolute left-28 text-2xl font-black">
Fin de Partie
Expand Down
4 changes: 2 additions & 2 deletions screens/Gamescreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function Gamescreen() {
}, []); // Fetch questions and players initially

const fetchQuestions = () => {
fetch(`http://192.168.1.99:${port}/api/questions`)
fetch(`http://192.168.1.66:${port}/api/questions`)
.then((response) => response.json())
.then((data) => {
const shuffledQuestions = shuffledArray(data);
Expand Down Expand Up @@ -132,7 +132,7 @@ export default function Gamescreen() {
className="absolute left-8"
onPress={goToHomescreen}
>
<HomeIcon color="white" size="30" className="" />
<HomeIcon color="white" size="30" className="" testID="homeButton" />
</TouchableOpacity>
<Text className="text-white absolute right-28 text-2xl font-black">
DRINK'UP
Expand Down

0 comments on commit 297c67f

Please sign in to comment.