Skip to content

Commit 6120c3a

Browse files
committed
Add the other languages in the codeblock elements. So that readers can see where examples are missing and for ease of contributions.
1 parent 8f07964 commit 6120c3a

File tree

4 files changed

+224
-12
lines changed

4 files changed

+224
-12
lines changed

Diff for: website_and_docs/content/documentation/test_practices/design_strategies.en.md

+56-3
Original file line numberDiff line numberDiff line change
@@ -445,14 +445,25 @@ Once these abstractions have been built and duplication in your tests identified
445445

446446
## Example
447447

448+
{{< tabpane text=true >}}
449+
{{< tab header="Python" >}}
450+
448451
An example of `python + pytest + selenium` which implemented "**Action Bot**, **Loadable Component** and **Page Object**".
449452

450453
A `pytest` fixture `chrome_driver`.
451454

452-
{{< tabpane text=true >}}
453-
{{< tab header="Python" >}}
454455
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L6-L26" >}}
455456
{{< /tab >}}
457+
{{< tab header="Java" >}}
458+
{{< /tab >}}
459+
{{< tab header="CSharp" >}}
460+
{{< /tab >}}
461+
{{< tab header="Ruby" >}}
462+
{{< /tab >}}
463+
{{< tab header="JavaScript" >}}
464+
{{< /tab >}}
465+
{{< tab header="Kotlin" >}}
466+
{{< /tab >}}
456467
{{< /tabpane >}}
457468

458469

@@ -462,6 +473,16 @@ A `pytest` fixture `chrome_driver`.
462473
{{< tab header="Python" >}}
463474
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L28-L65" >}}
464475
{{< /tab >}}
476+
{{< tab header="Java" >}}
477+
{{< /tab >}}
478+
{{< tab header="CSharp" >}}
479+
{{< /tab >}}
480+
{{< tab header="Ruby" >}}
481+
{{< /tab >}}
482+
{{< tab header="JavaScript" >}}
483+
{{< /tab >}}
484+
{{< tab header="Kotlin" >}}
485+
{{< /tab >}}
465486
{{< /tabpane >}}
466487

467488

@@ -471,6 +492,16 @@ A `pytest` fixture `chrome_driver`.
471492
{{< tab header="Python" >}}
472493
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L67-L80" >}}
473494
{{< /tab >}}
495+
{{< tab header="Java" >}}
496+
{{< /tab >}}
497+
{{< tab header="CSharp" >}}
498+
{{< /tab >}}
499+
{{< tab header="Ruby" >}}
500+
{{< /tab >}}
501+
{{< tab header="JavaScript" >}}
502+
{{< /tab >}}
503+
{{< tab header="Kotlin" >}}
504+
{{< /tab >}}
474505
{{< /tabpane >}}
475506

476507

@@ -480,12 +511,34 @@ A `pytest` fixture `chrome_driver`.
480511
{{< tab header="Python" >}}
481512
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L82-L172" >}}
482513
{{< /tab >}}
514+
{{< tab header="Java" >}}
515+
{{< /tab >}}
516+
{{< tab header="CSharp" >}}
517+
{{< /tab >}}
518+
{{< tab header="Ruby" >}}
519+
{{< /tab >}}
520+
{{< tab header="JavaScript" >}}
521+
{{< /tab >}}
522+
{{< tab header="Kotlin" >}}
523+
{{< /tab >}}
483524
{{< /tabpane >}}
484525

485-
Test cases implementation with `pytest`.
526+
Test cases implementation.
486527

487528
{{< tabpane text=true >}}
488529
{{< tab header="Python" >}}
530+
Test cases implementation with `pytest`.
531+
489532
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L174-" >}}
490533
{{< /tab >}}
534+
{{< tab header="Java" >}}
535+
{{< /tab >}}
536+
{{< tab header="CSharp" >}}
537+
{{< /tab >}}
538+
{{< tab header="Ruby" >}}
539+
{{< /tab >}}
540+
{{< tab header="JavaScript" >}}
541+
{{< /tab >}}
542+
{{< tab header="Kotlin" >}}
543+
{{< /tab >}}
491544
{{< /tabpane >}}

Diff for: website_and_docs/content/documentation/test_practices/design_strategies.ja.md

+57-3
Original file line numberDiff line numberDiff line change
@@ -437,14 +437,25 @@ public class ActionBot {
437437

438438
## Example
439439

440+
{{< tabpane text=true >}}
441+
{{< tab header="Python" >}}
442+
440443
**Action Bot****Loadable Component**、および **Page Object** を実装した `python + pytest + selenium` の例です。
441444

442445
A `pytest` fixture `chrome_driver`.
443446

444-
{{< tabpane text=true >}}
445-
{{< tab header="Python" >}}
446447
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L6-L26" >}}
447448
{{< /tab >}}
449+
{{< tab header="Java" >}}
450+
{{< /tab >}}
451+
{{< tab header="CSharp" >}}
452+
{{< /tab >}}
453+
{{< tab header="Ruby" >}}
454+
{{< /tab >}}
455+
{{< tab header="JavaScript" >}}
456+
{{< /tab >}}
457+
{{< tab header="Kotlin" >}}
458+
{{< /tab >}}
448459
{{< /tabpane >}}
449460

450461

@@ -454,6 +465,16 @@ A `pytest` fixture `chrome_driver`.
454465
{{< tab header="Python" >}}
455466
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L28-L65" >}}
456467
{{< /tab >}}
468+
{{< tab header="Java" >}}
469+
{{< /tab >}}
470+
{{< tab header="CSharp" >}}
471+
{{< /tab >}}
472+
{{< tab header="Ruby" >}}
473+
{{< /tab >}}
474+
{{< tab header="JavaScript" >}}
475+
{{< /tab >}}
476+
{{< tab header="Kotlin" >}}
477+
{{< /tab >}}
457478
{{< /tabpane >}}
458479

459480

@@ -463,6 +484,16 @@ A `pytest` fixture `chrome_driver`.
463484
{{< tab header="Python" >}}
464485
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L67-L80" >}}
465486
{{< /tab >}}
487+
{{< tab header="Java" >}}
488+
{{< /tab >}}
489+
{{< tab header="CSharp" >}}
490+
{{< /tab >}}
491+
{{< tab header="Ruby" >}}
492+
{{< /tab >}}
493+
{{< tab header="JavaScript" >}}
494+
{{< /tab >}}
495+
{{< tab header="Kotlin" >}}
496+
{{< /tab >}}
466497
{{< /tabpane >}}
467498

468499

@@ -472,12 +503,35 @@ A `pytest` fixture `chrome_driver`.
472503
{{< tab header="Python" >}}
473504
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L82-L172" >}}
474505
{{< /tab >}}
506+
{{< tab header="Java" >}}
507+
{{< /tab >}}
508+
{{< tab header="CSharp" >}}
509+
{{< /tab >}}
510+
{{< tab header="Ruby" >}}
511+
{{< /tab >}}
512+
{{< tab header="JavaScript" >}}
513+
{{< /tab >}}
514+
{{< tab header="Kotlin" >}}
515+
{{< /tab >}}
475516
{{< /tabpane >}}
476517

477-
Test cases implementation with `pytest`.
518+
Test cases implementation.
478519

479520
{{< tabpane text=true >}}
480521
{{< tab header="Python" >}}
522+
523+
Test cases implementation with `pytest`.
524+
481525
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L174-" >}}
482526
{{< /tab >}}
527+
{{< tab header="Java" >}}
528+
{{< /tab >}}
529+
{{< tab header="CSharp" >}}
530+
{{< /tab >}}
531+
{{< tab header="Ruby" >}}
532+
{{< /tab >}}
533+
{{< tab header="JavaScript" >}}
534+
{{< /tab >}}
535+
{{< tab header="Kotlin" >}}
536+
{{< /tab >}}
483537
{{< /tabpane >}}

Diff for: website_and_docs/content/documentation/test_practices/design_strategies.pt-br.md

+55-3
Original file line numberDiff line numberDiff line change
@@ -445,14 +445,24 @@ Once these abstractions have been built and duplication in your tests identified
445445

446446
## Example
447447

448+
{{< tabpane text=true >}}
449+
{{< tab header="Python" >}}
448450
An example of `python + pytest + selenium` which implemented "**Action Bot**, **Loadable Component** and **Page Object**".
449451

450452
A `pytest` fixture `chrome_driver`.
451453

452-
{{< tabpane text=true >}}
453-
{{< tab header="Python" >}}
454454
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L6-L26" >}}
455455
{{< /tab >}}
456+
{{< tab header="Java" >}}
457+
{{< /tab >}}
458+
{{< tab header="CSharp" >}}
459+
{{< /tab >}}
460+
{{< tab header="Ruby" >}}
461+
{{< /tab >}}
462+
{{< tab header="JavaScript" >}}
463+
{{< /tab >}}
464+
{{< tab header="Kotlin" >}}
465+
{{< /tab >}}
456466
{{< /tabpane >}}
457467

458468

@@ -462,6 +472,16 @@ A `pytest` fixture `chrome_driver`.
462472
{{< tab header="Python" >}}
463473
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L28-L65" >}}
464474
{{< /tab >}}
475+
{{< tab header="Java" >}}
476+
{{< /tab >}}
477+
{{< tab header="CSharp" >}}
478+
{{< /tab >}}
479+
{{< tab header="Ruby" >}}
480+
{{< /tab >}}
481+
{{< tab header="JavaScript" >}}
482+
{{< /tab >}}
483+
{{< tab header="Kotlin" >}}
484+
{{< /tab >}}
465485
{{< /tabpane >}}
466486

467487

@@ -471,6 +491,16 @@ A `pytest` fixture `chrome_driver`.
471491
{{< tab header="Python" >}}
472492
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L67-L80" >}}
473493
{{< /tab >}}
494+
{{< tab header="Java" >}}
495+
{{< /tab >}}
496+
{{< tab header="CSharp" >}}
497+
{{< /tab >}}
498+
{{< tab header="Ruby" >}}
499+
{{< /tab >}}
500+
{{< tab header="JavaScript" >}}
501+
{{< /tab >}}
502+
{{< tab header="Kotlin" >}}
503+
{{< /tab >}}
474504
{{< /tabpane >}}
475505

476506

@@ -480,12 +510,34 @@ A `pytest` fixture `chrome_driver`.
480510
{{< tab header="Python" >}}
481511
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L82-L172" >}}
482512
{{< /tab >}}
513+
{{< tab header="Java" >}}
514+
{{< /tab >}}
515+
{{< tab header="CSharp" >}}
516+
{{< /tab >}}
517+
{{< tab header="Ruby" >}}
518+
{{< /tab >}}
519+
{{< tab header="JavaScript" >}}
520+
{{< /tab >}}
521+
{{< tab header="Kotlin" >}}
522+
{{< /tab >}}
483523
{{< /tabpane >}}
484524

485-
Test cases implementation with `pytest`.
525+
Test cases implementation.
486526

487527
{{< tabpane text=true >}}
488528
{{< tab header="Python" >}}
529+
Test cases implementation with `pytest`.
530+
489531
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L174-" >}}
490532
{{< /tab >}}
533+
{{< tab header="Java" >}}
534+
{{< /tab >}}
535+
{{< tab header="CSharp" >}}
536+
{{< /tab >}}
537+
{{< tab header="Ruby" >}}
538+
{{< /tab >}}
539+
{{< tab header="JavaScript" >}}
540+
{{< /tab >}}
541+
{{< tab header="Kotlin" >}}
542+
{{< /tab >}}
491543
{{< /tabpane >}}

Diff for: website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md

+56-3
Original file line numberDiff line numberDiff line change
@@ -457,16 +457,27 @@ public class ActionBot {
457457
Once these abstractions have been built and duplication in your tests
458458
identified, it's possible to layer PageObjects on top of bots.
459459

460+
460461
## Example
461462

463+
{{< tabpane text=true >}}
464+
{{< tab header="Python" >}}
462465
一个用例 使用 `python + pytest + selenium` 实现了设计策略 "**Action Bot**, **Loadable Component****Page Object**".
463466

464467
A `pytest` fixture `chrome_driver`.
465468

466-
{{< tabpane text=true >}}
467-
{{< tab header="Python" >}}
468469
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L6-L26" >}}
469470
{{< /tab >}}
471+
{{< tab header="Java" >}}
472+
{{< /tab >}}
473+
{{< tab header="CSharp" >}}
474+
{{< /tab >}}
475+
{{< tab header="Ruby" >}}
476+
{{< /tab >}}
477+
{{< tab header="JavaScript" >}}
478+
{{< /tab >}}
479+
{{< tab header="Kotlin" >}}
480+
{{< /tab >}}
470481
{{< /tabpane >}}
471482

472483

@@ -476,6 +487,16 @@ A `pytest` fixture `chrome_driver`.
476487
{{< tab header="Python" >}}
477488
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L28-L65" >}}
478489
{{< /tab >}}
490+
{{< tab header="Java" >}}
491+
{{< /tab >}}
492+
{{< tab header="CSharp" >}}
493+
{{< /tab >}}
494+
{{< tab header="Ruby" >}}
495+
{{< /tab >}}
496+
{{< tab header="JavaScript" >}}
497+
{{< /tab >}}
498+
{{< tab header="Kotlin" >}}
499+
{{< /tab >}}
479500
{{< /tabpane >}}
480501

481502

@@ -485,6 +506,16 @@ A `pytest` fixture `chrome_driver`.
485506
{{< tab header="Python" >}}
486507
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L67-L80" >}}
487508
{{< /tab >}}
509+
{{< tab header="Java" >}}
510+
{{< /tab >}}
511+
{{< tab header="CSharp" >}}
512+
{{< /tab >}}
513+
{{< tab header="Ruby" >}}
514+
{{< /tab >}}
515+
{{< tab header="JavaScript" >}}
516+
{{< /tab >}}
517+
{{< tab header="Kotlin" >}}
518+
{{< /tab >}}
488519
{{< /tabpane >}}
489520

490521

@@ -494,12 +525,34 @@ A `pytest` fixture `chrome_driver`.
494525
{{< tab header="Python" >}}
495526
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L82-L172" >}}
496527
{{< /tab >}}
528+
{{< tab header="Java" >}}
529+
{{< /tab >}}
530+
{{< tab header="CSharp" >}}
531+
{{< /tab >}}
532+
{{< tab header="Ruby" >}}
533+
{{< /tab >}}
534+
{{< tab header="JavaScript" >}}
535+
{{< /tab >}}
536+
{{< tab header="Kotlin" >}}
537+
{{< /tab >}}
497538
{{< /tabpane >}}
498539

499-
Test cases implementation with `pytest`.
540+
Test cases implementation.
500541

501542
{{< tabpane text=true >}}
502543
{{< tab header="Python" >}}
544+
Test cases implementation with `pytest`.
545+
503546
{{< gh-codeblock path="/examples/python/tests/design_strategy/using_best_practice.py#L174-" >}}
504547
{{< /tab >}}
548+
{{< tab header="Java" >}}
549+
{{< /tab >}}
550+
{{< tab header="CSharp" >}}
551+
{{< /tab >}}
552+
{{< tab header="Ruby" >}}
553+
{{< /tab >}}
554+
{{< tab header="JavaScript" >}}
555+
{{< /tab >}}
556+
{{< tab header="Kotlin" >}}
557+
{{< /tab >}}
505558
{{< /tabpane >}}

0 commit comments

Comments
 (0)