react / react/react-native

[iOS] TestID for StatusBar component is not visible

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

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

Component: StatusBar Needs: Triage :mag: Never gets stale Platform: iOS
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

After adding testID, the new name attribute does not appear on the iOS platform, thanks to which I could use this element in my e2e tests. On the Android platform, this testID is visible as a resource-id attribute.
For example, in the Button component, after adding testID, the name attribute appears on the iOS platform, and for the Android platform, testID is visible as the resource-id attribute.

A screenshot from the Appium inspector tool, where all the attributes of the hidden element are visible (missing testID for iOS platform):

Screenshot 2023-09-11 at 12 53 57

A screenshot from the Appium inspector tool, where all the attributes of the hidden element are visible (testID is visible as resource-id for the Android platform):

Screenshot 2023-09-11 at 12 55 11

React Native Version

0.72.4

Output of npx react-native info

System:
OS: macOS 13.0.1
CPU: (8) arm64 Apple M1 Pro
Memory: 223.94 MB / 32.00 GB
Shell:
version: 5.8.1
path: /bin/zsh
Binaries:
Node:
version: 18.17.0
path: ~/.nvm/versions/node/v18.17.0/bin/node
Yarn:
version: 1.22.19
path: /usr/local/bin/yarn
npm:
version: 9.6.7
path: ~/.nvm/versions/node/v18.17.0/bin/npm
Watchman:
version: 2023.07.24.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/elzbietaszulc/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms:

  • DriverKit 22.1
  • iOS 16.1
  • macOS 13.0
  • tvOS 16.1
  • watchOS 9.1
    Android SDK: Not Found
    IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode:
    version: 14.1/14B47b
    path: /usr/bin/xcodebuild
    Languages:
    Java:
    version: 17.0.8
    path: /usr/bin/javac
    Ruby:
    version: 2.7.6
    path: /Users/elzbietaszulc/.rvm/rubies/ruby-2.7.6/bin/ruby
    npmPackages:
    "@react-native-community/cli": Not Found
    react: Not Found
    react-native: Not Found
    react-native-macos: Not Found
    npmGlobalPackages:
    "react-native": Not Found
    Android:
    hermesEnabled: false
    newArchEnabled: false
    iOS:
    hermesEnabled: true
    newArchEnabled: false
Steps to reproduce
  1. Add testID="status_bar_hidden_button" to the StatusBarExample.js component (hidden element)
  2. Reload RNtester app
  3. Run the Appium Inspector tool
  4. Check if name attribute has been added for the iOS platform
Snack, screenshot, or link to a repository

A link to the StatusBar component that I defined:

https://github.com/facebook/react-native/commit/1a0aa4deccf8e4906b6cabb6ca1c256144c1905d#diff-b18fc0c0f0855b6d50574152d4c1169b6e17ca8058d1cdf6aa0ff35203b03183

A link to StatusBarExample.js where I added testID:

https://github.com/elzszulc/react-native/commit/a8e91190646ee31d925d08e9916f707530319f87#diff-2b00a1862df8983883889bfdc2e01f3ea7ca3970edab508da39c26419f9447e3

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

StatusBarExample.js と関連する StatusBar コンポーネントの変更から始め、次に Appium Inspector を使って RNtester アプリで非表示要素のケースを再現します。iOS のアクセシビリティ属性と Android の resource-id の動作を比較します。testID が非表示の StatusBar 要素に対して期待される iOS の name 属性を生成すれば完了です。

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

評価

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

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

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