Guard a farm machine rental app with tests: role queries, snapshots, MSW, fake timers, Playwright. 12 levels, right in the browser.
What the levels ask
Monday morning: Salsa, a KKN student, starts helping Mr. Bowo with Sewa Alsin, the app villagers use to book the UPJA's machines from their phones. Before her first pull request comes in, Mr. Bowo writes a test for the machine list: Grandma Marni books the hand tractor with the screen reader on her phone. This week Salsa sends four changes. Choose how the test finds the tractor's Pesan button.
Mr. Tono fills in the size of his field, 2 ha, and reads the total before he books the tractor. The test has already typed 2 into the area field. Choose the statement that checks that total. Salsa sends four changes to FormSewa this week.
Mr. Tono's field by the stream is only half a hectare. The area field in Sewa Alsin refuses letters and full stops as they are typed, so Mr. Tono writes 0,5 with a comma. Choose how the test puts 0,5 into that field, the way Mr. Tono's thumb does.
Week two. Mrs. Tini rents the water pump for her tea garden, and the Sewa Alsin receipt tells her how much to pay at the shed. Salsa sends three changes to NotaSewa. Choose the statement that guards that receipt.
After last week, Mr. Bowo asks Salsa to read a snapshot's diff before she updates it, and CI no longer writes snapshots. Mr. Dodi rents the tractor for 14 July, and Sewa Alsin sends him an SMS. Every letter of that SMS reaches his phone. Choose the statement that guards the SMS against Salsa's four changes.
Week three: Sewa Alsin takes the machine list from the UPJA server at the district. The app's repo keeps an example of the server's answer in api/contoh/alat.json, and the server team updates it whenever the answer changes. The machine list test must not call the real server. Choose where the fake data comes from, and where the fake is put.
The machine list waits for the server, and the signal in the village comes and goes: over twenty runs the server answers in 35 to 260 milliseconds. Mrs. Tini looks for the water pump on the list, also while it is out on rent. Choose how the test waits for the list. One test file must finish in under a second.
The tractor the neighbourhood head rented must be back at the shed at 17.00, and Sewa Alsin reminds him 30 minutes before. The test sets a fake clock at 08.00 and moves it forward. Choose how far the clock moves.
Week four. Mr. Bowo starts the UPJA server on his laptop, and Playwright opens Sewa Alsin in Chromium and WebKit the way villagers' phones do: the list, the form, then the receipt. The flow test is written up to the receipt. Choose the locator for the thresher's Pesan button.
The UPJA server answers a booking in 200 to 900 milliseconds, depending on the signal. The receipt test runs ten times in Chromium and ten times in WebKit, with a different server delay on each run. Choose how the test waits for the receipt. One run in both browsers must finish within five seconds.
Salsa sends five changes this week. The check before a pull request is merged must finish in under 1.8 seconds (Playwright in Chromium only). On offer: four component tests, one Playwright flow test, and three Playwright flow tests. Choose what runs.
Salsa's last day. Mr. Bowo replays the last month's eleven pull requests against all of Sewa Alsin's tests. Each part of the app is guarded by its own test: a pull request that breaks a part must turn that part's test red. Complete the seven tests. The suite runs eight times and must finish within 8 seconds.