diff --git a/change/react-native-windows-b3755ae4-83be-44b9-ad2d-9f809f9aba5b.json b/change/react-native-windows-b3755ae4-83be-44b9-ad2d-9f809f9aba5b.json new file mode 100644 index 00000000000..492eca3e1db --- /dev/null +++ b/change/react-native-windows-b3755ae4-83be-44b9-ad2d-9f809f9aba5b.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Make Fetch integration test handle UTF-8 content.", + "packageName": "react-native-windows", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/vnext/TestWebSite/wwwroot/static/utf-8.json b/vnext/TestWebSite/wwwroot/static/utf-8.json new file mode 100644 index 00000000000..b08812a5758 --- /dev/null +++ b/vnext/TestWebSite/wwwroot/static/utf-8.json @@ -0,0 +1,5 @@ +{ + "IDS_ERR_CHANGES_SAVED": "Изменения сохранены.", + "IDS_ERR_CHANGES_NOT_SAVED": "Ошибка при сохранении изменений.", + "IDS_ERR_SOMETHING_WRONG": "Что-то пошло не так :(" +} diff --git a/vnext/TestWebSite/wwwroot/static/utf-8.txt b/vnext/TestWebSite/wwwroot/static/utf-8.txt new file mode 100644 index 00000000000..b68bf491d7b --- /dev/null +++ b/vnext/TestWebSite/wwwroot/static/utf-8.txt @@ -0,0 +1 @@ +IDS_ERR_CHANGES_SAVED : Изменения сохранены diff --git a/vnext/src-win/IntegrationTests/FetchTest.js b/vnext/src-win/IntegrationTests/FetchTest.js index 79c666fa581..74a065e9247 100644 --- a/vnext/src-win/IntegrationTests/FetchTest.js +++ b/vnext/src-win/IntegrationTests/FetchTest.js @@ -15,19 +15,15 @@ const {AppRegistry, View} = ReactNative; const {TestModule} = ReactNative.NativeModules; const uri = - 'https://raw.githubusercontent.com/microsoft/react-native-windows/main/.yarnrc.yml'; -const expectedContent = 'enableScripts: false'; + 'http://localhost:5555/static/utf-8.txt'; +const expectedContent = "IDS_ERR_CHANGES_SAVED : Изменения сохранены\n"; type State = { - uri: string, - expected: string, content: string, }; class FetchTest extends React.Component<{...}, State> { state: State = { - uri: 'https://raw.githubusercontent.com/microsoft/react-native-windows/main/.yarnrc.yml', - expected: 'enableScripts: false', content: '', };