Skip to content

Commit 986d952

Browse files
tmp
1 parent ffa5dd3 commit 986d952

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

react_on_rails_pro/spec/dummy/e2e-tests/fixture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const redisReceiverPageController = redisControlledTest.extend<RedisReceiverCont
6868
},
6969
matchPageSnapshot: async ({ page }, use) => {
7070
await use(async (snapshotPath) => {
71-
await expect(page.locator('.redis-receiver-container:visible')).toBeVisible();
71+
await expect(page.locator('.redis-receiver-container:visible')).toBeVisible({ timeout: 10000 });
7272
await expect(page.locator('.redis-receiver-container:visible').first()).toMatchAriaSnapshot({
7373
name: `${snapshotPath}.aria.yml`,
7474
});

react_on_rails_pro/spec/dummy/e2e-tests/streaming.spec.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,26 @@ import {
2424
],
2525
] as const
2626
).forEach(([pageName, test]) => {
27-
test(`incremental rendering of page: ${pageName}`, async ({ matchPageSnapshot, sendRedisItemValue }) => {
28-
await matchPageSnapshot('stage0');
27+
[...Array(parseInt(process.env.REPEATS ?? '1')).keys()].forEach(index => {
28+
test(`incremental rendering of page: ${pageName},no:${index}`, async ({ matchPageSnapshot, sendRedisItemValue }) => {
29+
await matchPageSnapshot('stage0');
2930

30-
await sendRedisItemValue(0, 'Incremental Value1');
31-
await matchPageSnapshot('stage1');
31+
await sendRedisItemValue(0, 'Incremental Value1');
32+
await matchPageSnapshot('stage1');
3233

33-
await sendRedisItemValue(3, 'Incremental Value4');
34-
await matchPageSnapshot('stage2');
34+
await sendRedisItemValue(3, 'Incremental Value4');
35+
await matchPageSnapshot('stage2');
3536

36-
await sendRedisItemValue(1, 'Incremental Value2');
37-
await matchPageSnapshot('stage3');
37+
await sendRedisItemValue(1, 'Incremental Value2');
38+
await matchPageSnapshot('stage3');
3839

39-
await sendRedisItemValue(2, 'Incremental Value3');
40-
await matchPageSnapshot('stage4');
40+
await sendRedisItemValue(2, 'Incremental Value3');
41+
await matchPageSnapshot('stage4');
4142

42-
await sendRedisItemValue(4, 'Incremental Value5');
43-
await matchPageSnapshot('stage5');
44-
});
43+
await sendRedisItemValue(4, 'Incremental Value5');
44+
await matchPageSnapshot('stage5');
45+
});
46+
})
4547

4648
test(`early hydration of page: ${pageName}`, async ({
4749
page,

react_on_rails_pro/spec/dummy/spec/rails_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,5 @@
171171
Capybara.asset_host = "http://localhost:3000"
172172
Capybara.app_host = "http://localhost:3000"
173173
Capybara.run_server = false
174+
Capybara.save_path = "tmp/capybara#{ENV['TEST_NO']}"
174175
end

react_on_rails_pro/spec/dummy/spec/system/integration_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ def change_text_expect_dom_selector(dom_selector, expect_no_change: false)
411411
expect(page).not_to have_text "Loading branch2"
412412
expect(page).not_to have_text(/Loading branch1 at level \d+/)
413413
expect(page).to have_text(/branch1 \(level \d+\)/, count: 5)
414+
screenshot_and_save_page
414415
end
415416

416417
it "doesn't hydrate status component if packs are not loaded" do

0 commit comments

Comments
 (0)