Skip to content

Commit

Permalink
rename chapters 26 and 27
Browse files Browse the repository at this point in the history
  • Loading branch information
hjwp committed Oct 13, 2024
1 parent 5ce5ffa commit d5b9340
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
test_chapter_23_debugging_prod,
test_chapter_24_outside_in,
test_chapter_25_CI,
test_chapter_25_page_pattern,
test_chapter_26_page_pattern,
]

env:
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
[submodule "source/chapter_25_CI/superlists"]
path = source/chapter_25_CI/superlists
url = [email protected]:hjwp/book-example.git
[submodule "source/chapter_25_page_pattern/superlists"]
path = source/chapter_25_page_pattern/superlists
[submodule "source/chapter_26_page_pattern/superlists"]
path = source/chapter_26_page_pattern/superlists
url = [email protected]:hjwp/book-example.git

[submodule "tests/testrepo"]
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ test_chapter_24_outside_in: chapter_24_outside_in.html $(TMPDIR) $(VENV)/bin
.PHONY: test_chapter_25_CI
test_chapter_25_CI: chapter_25_CI.html $(TMPDIR) $(VENV)/bin
$(VENV)/bin/pytest -s --tb=short ./tests/test_chapter_25_CI.py
.PHONY: test_chapter_25_page_pattern
test_chapter_25_page_pattern: chapter_25_page_pattern.html $(TMPDIR) $(VENV)/bin
$(VENV)/bin/pytest -s --tb=short ./tests/test_chapter_25_page_pattern.py
.PHONY: test_chapter_26_page_pattern
test_chapter_26_page_pattern: chapter_26_page_pattern.html $(TMPDIR) $(VENV)/bin
$(VENV)/bin/pytest -s --tb=short ./tests/test_chapter_26_page_pattern.py


.PHONY: test_appendix_purist_unit_tests
Expand Down
4 changes: 2 additions & 2 deletions appendix_IX_cheat_sheet.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Selenium/Functional Testing Best Practices
* Look into BDD tools as another way of structuring your FTs.
Relevant chapters: <<chapter_23_debugging_prod>>, <<chapter_25_CI>>,
<<chapter_25_page_pattern>>
<<chapter_26_page_pattern>>

Outside-In, Test Isolation Versus Integrated Tests, and Mocking
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -162,5 +162,5 @@ painful, remember &#x201c;__listen to your tests__&#x201d;—ugly, mocky tests m
trying to tell you that your code could be simplified.

Relevant chapters: <<chapter_24_outside_in>>, <<appendix_purist_unit_tests>>,
<<chapter_26_hot_lava>>
<<chapter_27_hot_lava>>

2 changes: 1 addition & 1 deletion appendix_bdd.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ The Page Pattern as an Alternative
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

((("behavior-driven development (BDD)", "page pattern")))((("page pattern")))In
<<chapter_25_page_pattern>> of the book, I present an example of the "Page
<<chapter_26_page_pattern>> of the book, I present an example of the "Page
pattern", which is an object-oriented approach to structuring your Selenium
tests. Here's a reminder of what it looks like:

Expand Down
2 changes: 1 addition & 1 deletion appendix_github_links.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Full List of Links for Each Chapter
<<chapter_24_outside_in>>:: https://github.com/hjwp/book-example/tree/chapter_24_outside_in
<<appendix_purist_unit_tests>>:: https://github.com/hjwp/book-example/tree/appendix_purist_unit_tests
<<chapter_25_CI>>:: https://github.com/hjwp/book-example/tree/chapter_25_CI
<<chapter_25_page_pattern>>:: https://github.com/hjwp/book-example/tree/chapter_25_page_pattern
<<chapter_26_page_pattern>>:: https://github.com/hjwp/book-example/tree/chapter_26_page_pattern
<<appendix_Django_Class-Based_Views>>:: https://github.com/hjwp/book-example/tree/appendix_Django_Class-Based_Views
<<appendix_bdd>>:: https://github.com/hjwp/book-example/tree/appendix_bdd
<<appendix_rest_api>>:: https://github.com/hjwp/book-example/tree/appendix_rest_api
Expand Down
4 changes: 2 additions & 2 deletions appendix_purist_unit_tests.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ class NewListViewIntegratedTest(TestCase):

TIP: Have you heard the term "integration test" and are wondering what the
difference is from an "integrated test"? Go and take a peek at the
definitions box in <<chapter_26_hot_lava>>.
definitions box in <<chapter_27_hot_lava>>.



Expand Down Expand Up @@ -2007,7 +2007,7 @@ benefits.

It's a judgement call. I hope that, by going through this appendix, I've given
you a feel for what the trade-offs are. There's more discussion on this in
<<chapter_26_hot_lava>>.((("", startref="IEinteg23")))((("", startref="IEisol23")))
<<chapter_27_hot_lava>>.((("", startref="IEinteg23")))((("", startref="IEisol23")))


Onwards!
Expand Down
2 changes: 1 addition & 1 deletion appendix_rest_api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ has a good overview. In brief:
* GET will give you details of a list (including all its items) in JSON format
* POST lets you add an item
We'll take the code from its state at the end of <<chapter_25_page_pattern>>.
We'll take the code from its state at the end of <<chapter_26_page_pattern>>.


Choosing Our Test Approach
Expand Down
4 changes: 2 additions & 2 deletions atlas.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"chapter_23_debugging_prod.asciidoc",
"chapter_24_outside_in.asciidoc",
"chapter_25_CI.asciidoc",
"chapter_25_page_pattern.asciidoc",
"chapter_26_hot_lava.asciidoc",
"chapter_26_page_pattern.asciidoc",
"chapter_27_hot_lava.asciidoc",
"epilogue.asciidoc",
"appendix_I_PythonAnywhere.asciidoc",
"appendix_Django_Class-Based_Views.asciidoc",
Expand Down
4 changes: 2 additions & 2 deletions book.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ include::chapter_22_fixtures_and_wait_decorator.asciidoc[]
include::chapter_23_debugging_prod.asciidoc[]
include::chapter_24_outside_in.asciidoc[]
include::chapter_25_CI.asciidoc[]
include::chapter_25_page_pattern.asciidoc[]
include::chapter_26_hot_lava.asciidoc[]
include::chapter_26_page_pattern.asciidoc[]
include::chapter_27_hot_lava.asciidoc[]

include::epilogue.asciidoc[]

Expand Down
6 changes: 3 additions & 3 deletions chapter_13_organising_test_files.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ class FunctionalTest(StaticLiveServerTestCase):

NOTE: Keeping helper methods in a base `FunctionalTest` class
is one useful way of preventing duplication in FTs.
Later in the book (in <<chapter_25_page_pattern>>) we'll use the "Page pattern",
Later in the book (in <<chapter_26_page_pattern>>) we'll use the "Page pattern",
// CSANAD: is this reference to the chapter "The Token Social Bit, the Page
// Pattern, and an Exercise for the Reader" as chapter_25_page_pattern
// Pattern, and an Exercise for the Reader" as chapter_26_page_pattern
// still clear in print?
which is related, but prefers composition over inheritance--always a good thing.

Expand Down Expand Up @@ -716,7 +716,7 @@ The day we decide to change the implementation of how our list table works,
we want to make sure we only have to change our FT code in one place,
not in dozens of places across loads of FTs...
See also <<chapter_25_page_pattern>> and <<appendix_bdd>> for more on structuring
See also <<chapter_26_page_pattern>> and <<appendix_bdd>> for more on structuring
your FT code.
*******************************************************************************

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[[chapter_25_page_pattern]]
[[chapter_26_page_pattern]]
== The Token Social Bit, the Page Pattern, and an Exercise for the Reader

.Warning, Chapter Update in Progress
Expand Down Expand Up @@ -419,7 +419,7 @@ $ *git commit -m "Create Page objects for list pages, use in sharing FT"*
[quote, Iain H. (reader)]
______________________________________________________________
I probably didn’t really understand what I was doing until after having
completed the "Exercise for the reader" in <<chapter_25_page_pattern>>.
completed the "Exercise for the reader" in <<chapter_26_page_pattern>>.
______________________________________________________________

((("Page pattern", "practical exercise")))There's
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[[chapter_26_hot_lava]]
[[chapter_27_hot_lava]]
Fast Tests, Slow Tests, and Hot Lava
------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion preface.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ I've split this book into three parts.
JavaScript.


<<part3>> (Chapters pass:[<a data-type="xref" data-xrefstyle="select:labelnumber" href="#chapter_19_spiking_custom_auth">#chapter_19_spiking_custom_auth</a>–<a data-type="xref" data-xrefstyle="select:labelnumber" href="#chapter_26_hot_lava">#chapter_26_hot_lava</a>]): More advanced testing topics::
<<part3>> (Chapters pass:[<a data-type="xref" data-xrefstyle="select:labelnumber" href="#chapter_19_spiking_custom_auth">#chapter_19_spiking_custom_auth</a>–<a data-type="xref" data-xrefstyle="select:labelnumber" href="#chapter_27_hot_lava">#chapter_27_hot_lava</a>]): More advanced testing topics::
Mocking, integrating a third-party system, test fixtures, Outside-In TDD,
and Continuous Integration (CI).

Expand Down
4 changes: 2 additions & 2 deletions tests/chapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"chapter_23_debugging_prod",
"chapter_24_outside_in",
"chapter_25_CI",
"chapter_25_page_pattern",
"chapter_26_page_pattern",

"chapter_26_hot_lava",
"chapter_27_hot_lava",

]
2 changes: 1 addition & 1 deletion tests/test_appendix_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class AppendixVITest(ChapterTest):
chapter_name = 'appendix_rest_api'
previous_chapter = 'chapter_25_page_pattern'
previous_chapter = 'chapter_26_page_pattern'

def test_listings_and_commands_and_output(self):
self.parse_listings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class Chapter22Test(ChapterTest):
chapter_name = "chapter_25_page_pattern"
chapter_name = "chapter_26_page_pattern"
previous_chapter = "chapter_25_CI"

def test_listings_and_commands_and_output(self):
Expand Down

0 comments on commit d5b9340

Please sign in to comment.