Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

State always has initial value when submitting in tests

オープン
#130 コメント 0 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react-native, typescript
領域
mobile, testing

調査の方向性

リンクされた react-native-owl デモとリンクされた test-app の変更を使用して問題を再現し、まず検索入力、state の値、送信ボタンのフローを確認します。テスト環境で入力に表示される値と送信時に受け取る値を比較します。iOS と Android のテストで送信時に現在のクエリを受け取れば完了です。

索引モデルが issue の本文から書いたものです。

説明

I'm testing out react-native-owl and it's great library!
I encountered one strange issue - in my test app I have search input with submit button. Search query is saved in state (with useState). When I press "Search" button, it requests backend and shows results. When I test it with react-native-owl, the query is always empty. I added <Text> with text value and it displays valid value, but when I press submit button and it's empty.
I tried to reproduce it using your demo app https://github.com/FormidableLabs/react-native-owl-demo so I added submit button with onPress={() => Alert.alert('text from state', text)} and it's also empty. When I pressed it manually afterwards (during test) it shows valid text.

Tested on iOS simulator and Android emulator.

https://github.com/marcinkornek/react-native-owl-demo-test link to react-native-owl-demo with changes mentioned below.

image

image

Please see videos below:

  • when testing it manually in simulator

https://user-images.githubusercontent.com/7931279/200515932-98b425af-de13-4a3c-9c6d-8bd0b92a4326.mov

  • when running react-native-owl tests

https://user-images.githubusercontent.com/7931279/200515855-13a9e76c-723a-44db-bb36-624a3c3c3da3.mov

主要言語
TypeScript
スター
694
フォーク
27
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

FormidableLabs/react-native-owl のほかの issue

FormidableLabs/react-native-owl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。