Skip to content

Commit

Permalink
chore(e2e): update json schema and optimize db request Update game la…
Browse files Browse the repository at this point in the history
…unch process, JSON schema, and data fetching logic (#286)

# Pull Request Template

## Description

Please include a summary of the change and which issue is fixed. Also,
include relevant motivation and context. List any dependencies that are
required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration.

- [ ] Test A
- [ ] Test B


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Streamlined game launch process by updating the launch command to a
specific button and removing unnecessary player name input.
- Enhanced schema for improved functionality, including new properties
and modifications for better command execution.

- **Bug Fixes**
- Normalized key commands from "enter" to "Enter" for consistency in
user interactions.

- **Improvements**
- Optimized data fetching in the game screen to retrieve only relevant
fields, enhancing performance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
caxewsh authored Oct 19, 2024
2 parents 46bf337 + a9e54cf commit 3f12041
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 2 additions & 6 deletions .maestro/launchGame.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
appId: com.axe.l.r.drinkup
---
- launchApp
- tapOn: # Open the server in dev build if possible
point: "50%,26%"

- tapOn: "LANCER LA PARTIE"

- assertVisible: "LOBBY"
Expand All @@ -14,13 +13,10 @@ appId: com.axe.l.r.drinkup
- inputRandomPersonName
- pressKey: Enter


- tapOn: "ON EST PRET !"

- repeat:
while:
notVisible: "Classement"
commands:
- tapOn: "TOUR SUIVANT"


- tapOn: "TOUR SUIVANT"
8 changes: 6 additions & 2 deletions .maestro/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"enum": [
"home",
"lock",
"enter",
"Enter",
"backspace",
"volume up",
"volume down",
Expand Down Expand Up @@ -129,7 +129,11 @@
}
}
},
"required": ["commands", "times"]
"required": ["commands"],
"oneOf": [
{ "required": ["times"] },
{ "required": ["while"] }
]
},
"runFlow": {
"title": "Runs a flow from a specified file.",
Expand Down
4 changes: 2 additions & 2 deletions .maestro/trashButton.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ appId: com.axe.l.r.drinkup
- assertVisible: "LOBBY"
- tapOn: "Nom du joueur"
- inputText: "test"
- pressKey: enter
- pressKey: Enter
- assertVisible: "test"
- tapOn:
id: "trashButton"
- assertNotVisible: "test"
- tapOn: "Nom du joueur"
- inputText: "test"
- pressKey: enter
- pressKey: Enter
- assertVisible: "test"
- stopApp
2 changes: 1 addition & 1 deletion screens/Gamescreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function Gamescreen() {
const fetchQuestionsAndPlayers = async () => {
setIsLoading(true);
try {
let { data: questionsData, error } = await supabase.from("questionsV3").select("*");
let { data: questionsData, error } = await supabase.from("questionsV3").select("Theme, Questions, severity");
if (error) throw error;

if (!Array.isArray(questionsData)) {
Expand Down

0 comments on commit 3f12041

Please sign in to comment.