Skip to content

Commit 3963ab2

Browse files
committed
Update specs checking Hello World card on seed realm
1 parent 1b09e17 commit 3963ab2

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

packages/matrix/tests/live-cards.spec.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ test.describe('Live Cards', () => {
5555
skipOpeningAssistant: true,
5656
});
5757
await createRealm(page, realmName);
58-
await page.goto(`${realmURL}hello-world`);
58+
await page.goto(
59+
`${realmURL}HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0`,
60+
);
5961
await expect(
60-
page.locator(`[data-test-card="${realmURL}hello-world"]`),
62+
page.locator(
63+
`[data-test-card="${realmURL}HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0"]`,
64+
),
6165
).toContainText('Hello World');
6266

6367
// assert that instance updates are live bound
@@ -66,7 +70,7 @@ test.describe('Live Cards', () => {
6670
'..',
6771
'user1',
6872
realmName,
69-
'hello-world.json',
73+
'HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0.json',
7074
);
7175
await expect(
7276
page.locator('[data-test-realm-indexing-indicator]'),
@@ -90,7 +94,9 @@ test.describe('Live Cards', () => {
9094
page.locator('[data-test-realm-indexing-indicator]'),
9195
).toHaveCount(1);
9296
await expect(
93-
page.locator(`[data-test-card="${realmURL}hello-world"]`),
97+
page.locator(
98+
`[data-test-card="${realmURL}HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0"]`,
99+
),
94100
).toContainText('Hello Mars');
95101
await expect(
96102
page.locator('[data-test-realm-indexing-indicator]'),

packages/matrix/tests/registration-with-token.spec.ts

+13-5
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ test.describe('User Registration w/ Token - isolated realm server', () => {
187187
).toHaveCount(1);
188188
await showAllCards(page);
189189
await expect(
190-
page.locator(`[data-test-cards-grid-item="${newRealmURL}hello-world"]`),
190+
page.locator(
191+
`[data-test-cards-grid-item="${newRealmURL}HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0"]`,
192+
),
191193
).toHaveCount(1);
192194
await page.locator(`[data-test-workspace-chooser-toggle]`).click();
193195
await expect(page.locator('[data-test-workspace-chooser]')).toHaveCount(1);
@@ -262,9 +264,13 @@ test.describe('User Registration w/ Token - isolated realm server', () => {
262264

263265
// assert that logged in user can navigate directly to card in private realm without
264266
// being asked to login
265-
await page.goto(`${newRealmURL}hello-world`);
267+
await page.goto(
268+
`${newRealmURL}HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0`,
269+
);
266270
await expect(
267-
page.locator(`[data-test-card="${newRealmURL}hello-world"]`),
271+
page.locator(
272+
`[data-test-card="${newRealmURL}HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0"]`,
273+
),
268274
).toContainText('Hello World');
269275

270276
// assert that non-logged in user is prompted to login before navigating
@@ -273,12 +279,14 @@ test.describe('User Registration w/ Token - isolated realm server', () => {
273279
await assertLoggedOut(page);
274280

275281
await login(page, 'user1', 'mypassword1!', {
276-
url: `${newRealmURL}hello-world`,
282+
url: `${newRealmURL}HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0`,
277283
skipOpeningAssistant: true,
278284
});
279285
await assertLoggedIn(page, { displayName: 'Test User' });
280286
await expect(
281-
page.locator(`[data-test-card="${newRealmURL}hello-world"]`),
287+
page.locator(
288+
`[data-test-card="${newRealmURL}HelloWorld/47c0fc54-5099-4e9c-ad0d-8a58572d05c0"]`,
289+
),
282290
).toHaveCount(1);
283291

284292
let auth = await loginUser(`user1`, 'mypassword1!');

0 commit comments

Comments
 (0)