Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DONE ] Testing Recipes .. #198

Merged
merged 5 commits into from Nov 24, 2019

Conversation

mohamedsgap
Copy link
Contributor

@mohamedsgap mohamedsgap commented Nov 10, 2019

Finish translating Testing Recipes page!
Refs: HERE

@netlify
Copy link

netlify bot commented Nov 10, 2019

Deploy preview for ar-reactjs ready!

Built with commit 6594af5

https://deploy-preview-198--ar-reactjs.netlify.com

@3imed-jaberi 3imed-jaberi changed the title Testing Recipes Translate [DONE ] Testing Recipes .. Nov 10, 2019
Copy link
Member

@3imed-jaberi 3imed-jaberi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mohamedsgap, شكرا لك على مساهمتك في المحتوى العربي لمستندات React 🎉 ...

ارجو منك التاكد من ان كل كلمة renders تمت ترجمتها إلى التصيير ..

content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Show resolved Hide resolved
content/docs/testing-recipes.md Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
@3imed-jaberi 3imed-jaberi added changes-requested update needed This PR needs update since last commit and removed in-review labels Nov 11, 2019
@3imed-jaberi
Copy link
Member

@mohamedsgap, any update !!

@mohamedsgap
Copy link
Contributor Author

@3imed-jaberi sorry, I'm so busy this week but I'm going to submit the new changes on Friday.

@mohamedsgap
Copy link
Contributor Author

@3imed-jaberi @Aissaoui-Ahmed I've finished translating the request changes!

content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
content/docs/testing-recipes.md Outdated Show resolved Hide resolved
@mohamedsgap
Copy link
Contributor Author

I've done the latest request changes! @3imed-jaberi @Aissaoui-Ahmed thanks a lot guys for helping me :)


You might find using `act()` directly a bit too verbose. To avoid some of the boilerplate, you could use a library like [React Testing Library](https://testing-library.com/react), whose helpers are wrapped with `act()`.
قد تجد استخدام `act ()`بشكل مطول قليلاً جدًا. لتجنب بعض العناصر النحاسية ، يمكنك استخدام مكتبة مثل [React Testing Library](https://testing-library.com/react)، حيث يتم لف مساعديه `act()`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
قد تجد استخدام `act ()`بشكل مطول قليلاً جدًا. لتجنب بعض العناصر النحاسية ، يمكنك استخدام مكتبة مثل [React Testing Library](https://testing-library.com/react)، حيث يتم لف مساعديه `act()`.
قد تجد استخدام `act()`بشكل مطول قليلاً جدًا. لتجنب بعض العناصر النحاسية ، يمكنك استخدام مكتبة مثل [React Testing Library](https://testing-library.com/react)، حيث يتم لف مساعديه `act()`.

>
> The name `act` comes from the [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert) pattern.
> اسم `act` يأتى من نمط ال [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> اسم `act` يأتى من نمط ال [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert)
> اسم `act` يأتى من نمط ال [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert)

@@ -139,9 +142,10 @@ it("renders with or without a name", () => {

---

### Data Fetching {#data-fetching}
### جلب البيانات {#data-fetching}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### جلب البيانات {#data-fetching}
### جلب البيانات {#data-fetching}

@@ -228,11 +232,12 @@ it("renders user data", async () => {

---

### Mocking Modules {#mocking-modules}
### محاكاة الوحدات {#mocking-modules}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### محاكاة الوحدات {#mocking-modules}
### محاكاة الوحدات {#mocking-modules}

@@ -337,9 +342,9 @@ it("should render contact information", () => {

---

### Events {#events}
### الأحداث {#events}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### الأحداث {#events}
### الأحداث {#events}


---

### Snapshot Testing {#snapshot-testing}
### لقطة اختبار {#snapshot-testing}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### لقطة اختبار {#snapshot-testing}
### لقطة اختبار {#snapshot-testing}

>
> This page assumes you're using [Jest](https://jestjs.io/) as a test runner. If you use a different test runner, you may need to adjust the API, but the overall shape of the solution will likely be the same. Read more details on setting up a testing environment on the [Testing Environments](/docs/testing-environments.html) page.
> تفترض هذه الصفحة أنك تستخدم [Jest](https://jestjs.io/) كمرشح للاختبار. إذا كنت تستخدم عداء اختبار مختلفًا ، فقد تحتاج إلى ضبط واجهة برمجة التطبيقات ، ولكن من المحتمل أن يكون الشكل العام للحل هو نفسه. اقرأ المزيد من التفاصيل حول إعداد بيئة اختبار على صفحة اختبار البيئات.[بيئات الاختبار](/docs/testing-environments.html)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> تفترض هذه الصفحة أنك تستخدم [Jest](https://jestjs.io/) كمرشح للاختبار. إذا كنت تستخدم عداء اختبار مختلفًا ، فقد تحتاج إلى ضبط واجهة برمجة التطبيقات ، ولكن من المحتمل أن يكون الشكل العام للحل هو نفسه. اقرأ المزيد من التفاصيل حول إعداد بيئة اختبار على صفحة اختبار البيئات.[بيئات الاختبار](/docs/testing-environments.html)
> تفترض هذه الصفحة أنك تستخدم [Jest](https://jestjs.io/) كمرشح للاختبار. إذا كنت تستخدم عداء اختبار مختلفًا ، فقد تحتاج إلى ضبط واجهة برمجة التطبيقات ، ولكن من المحتمل أن يكون الشكل العام للحل هو نفسه. اقرأ المزيد من التفاصيل حول إعداد بيئة اختبار على صفحة اختبار البيئات.[بيئات الاختبار](/docs/testing-environments.html)


For each test, we usually want to render our React tree to a DOM element that's attached to `document`. This is important so that it can receive DOM events. When the test ends, we want to "clean up" and unmount the tree from the `document`.
لكل اختبار نقوم باعادة تقديم React tree الى عنصر DOM المرفق ب `document`. وهذا مهم حتى نتمكن من استقبال DOM events. وعندما ينتهى الاختبار نريد ازاله ال tree من `document`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
لكل اختبار نقوم باعادة تقديم React tree الى عنصر DOM المرفق ب `document`. وهذا مهم حتى نتمكن من استقبال DOM events. وعندما ينتهى الاختبار نريد ازاله ال tree من `document`.
لكل اختبار نقوم باعادة تقديم React tree الى عنصر DOM المرفق ب `document`. وهذا مهم حتى نتمكن من استقبال DOM events. وعندما ينتهى الاختبار نريد ازاله ال tree من `document`.


A common way to do it is to use a pair of `beforeEach` and `afterEach` blocks so that they'll always run and isolate the effects of a test to itself:
هناك طريقة شائعة للقيام بذلك هي استخدام زوج من `beforeEach` و `afterEach` بحيث يتم تشغيلهما دائمًا وعزل آثار الاختبار عن نفسه:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
هناك طريقة شائعة للقيام بذلك هي استخدام زوج من `beforeEach` و `afterEach` بحيث يتم تشغيلهما دائمًا وعزل آثار الاختبار عن نفسه:
هناك طريقة شائعة للقيام بذلك هي استخدام زوج من `beforeEach` و `afterEach` بحيث يتم تشغيلهما دائمًا وعزل آثار الاختبار عن نفسه:

Copy link
Member

@Aissaoui-Ahmed Aissaoui-Ahmed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job just remove double spaces

@3imed-jaberi 3imed-jaberi added in-review and removed changes-requested update needed This PR needs update since last commit labels Nov 24, 2019
Copy link
Member

@3imed-jaberi 3imed-jaberi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 ..

@mohamedsgap
Copy link
Contributor Author

just removed double spaces @Aissaoui-Ahmed , @3imed-jaberi approved the pull request!, what's next guys! ?
are there any pages available to translate ?

Copy link
Member

@Aissaoui-Ahmed Aissaoui-Ahmed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great ❤️

@asantarissy
Copy link
Member

just removed double spaces @Aissaoui-Ahmed , @3imed-jaberi approved the pull request!, what's next guys! ?
are there any pages available to translate ?

Great job @mohamedsgap 🚀 check out #1 we still have couple of pages, enjoy 😊

@3imed-jaberi 3imed-jaberi merged commit 76dc5d6 into reactjs:master Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants