mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This Pull request adds the UI changes to the RNTester app as discussed in the MLH Fellowship. This list is not exhaustive. - The initial App screen is redesigned. - A bottom Navbar has been added. - Filter pills are added. - The list card UI is updated. - The example page UI is updated. - Recently Viewed Sections are added. It shows the last 5 recently viewed components/APIs. - Bookmarking functionality is added. - The documentation URL is added to the example page. - RNTester doesn't lose its state on a hard refresh (even on iOS). <img width="373" src="https://user-images.githubusercontent.com/22813027/90530113-20346180-e192-11ea-8ef6-789fa25b402b.png" /> <img width="373" src="https://user-images.githubusercontent.com/22813027/90530112-20346180-e192-11ea-9539-706b540fcc5f.png" /> <img width="373" src="https://user-images.githubusercontent.com/22813027/90530100-1d397100-e192-11ea-8836-b88070643233.png" /> <img width="373" src="https://user-images.githubusercontent.com/22813027/90530110-1f9bcb00-e192-11ea-936b-64ee75fa4289.png" /> Pull Request resolved: https://github.com/facebook/react-native/pull/29685 Test Plan: Imported from GitHub, without a `Test Plan:` line. {F302717939} Note: this failed **before** this diff too: {F302745716} Reviewed By: mdvacca, cpojer Differential Revision: D23240434 fbshipit-source-id: 65e2766a6a097eca0e0d0fda8dadf6871e9276c2 Co-authored-by: agarwalmanya <manya18ag@gmail.com> Co-authored-by: chirag-singhal <csinghal208@gmail.com> Co-authored-by: Ansh Godha <ag759@cornell.edu> Co-authored-by: Yash Kumar Verma <yk.verma2000@gmail.com> Co-authored-by: Sanskar Jethi <sansyrox@gmail.com> Co-authored-by: Aniketh Saha <anik220798@gmail.com> Co-authored-by: Xtremilicious <nilarjundas@outlook.com> Co-authored-by: Jani Evakallio <jani.evakallio@gmail.com>
63 lines
1.7 KiB
JavaScript
63 lines
1.7 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @emails oncall+react_native
|
|
* @format
|
|
*/
|
|
|
|
/* global device, element, by, expect */
|
|
const {
|
|
openComponentWithLabel,
|
|
openExampleWithTitle,
|
|
} = require('../e2e-helpers');
|
|
|
|
describe('TextInput', () => {
|
|
beforeAll(async () => {
|
|
await device.reloadReactNative();
|
|
await openComponentWithLabel(
|
|
'TextInput',
|
|
'Single and multi-line text inputs.',
|
|
);
|
|
});
|
|
|
|
it('Live rewrite with spaces should replace spaces and enforce max length', async () => {
|
|
await openExampleWithTitle('Live Re-Write \\(<sp>');
|
|
|
|
await element(by.id('rewrite_sp_underscore_input')).typeText(
|
|
'this is a long sentence',
|
|
);
|
|
await expect(element(by.id('rewrite_sp_underscore_input'))).toHaveText(
|
|
'this_is_a_long_sente',
|
|
);
|
|
});
|
|
|
|
it('Live rewrite with no spaces should remove spaces', async () => {
|
|
await openExampleWithTitle('Live Re-Write \\(no spaces');
|
|
|
|
await element(by.id('rewrite_no_sp_input')).typeText(
|
|
'this is a long sentence',
|
|
);
|
|
await expect(element(by.id('rewrite_no_sp_input'))).toHaveText(
|
|
'thisisalongsentence',
|
|
);
|
|
});
|
|
|
|
it('Live rewrite with clear should remove spaces and clear', async () => {
|
|
await openExampleWithTitle('and clear');
|
|
|
|
await element(by.id('rewrite_clear_input')).typeText(
|
|
'this is a long sentence',
|
|
);
|
|
await expect(element(by.id('rewrite_clear_input'))).toHaveText(
|
|
'thisisalongsentence',
|
|
);
|
|
|
|
await element(by.id('rewrite_clear_button')).tap();
|
|
|
|
await expect(element(by.id('rewrite_clear_input'))).toHaveText('');
|
|
});
|
|
});
|