Render private space covers in Spaces list entries
Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a11538-05ea-7b63-b3c7-a2df5f38898d
This commit is contained in:
parent
6a4930ab15
commit
e43f17658a
7 changed files with 33 additions and 3 deletions
|
|
@ -50,6 +50,7 @@ try {
|
|||
}
|
||||
await login('writer');
|
||||
assert.match(await page.locator('main').innerText(), new RegExp(scenario.space_title));
|
||||
await page.waitForFunction(() => document.querySelector('.space-list .space-cover')?.naturalWidth === 1);
|
||||
await page.locator(`a[href="/app/spaces/${scenario.space_slug}/"]`).click();
|
||||
await page.getByRole('link', {name: scenario.previous_title, exact: true}).click();
|
||||
await page.waitForFunction(() => document.querySelector('#page-content img')?.naturalWidth === 1);
|
||||
|
|
@ -124,6 +125,7 @@ try {
|
|||
assert.match(await page.locator('#page-content').innerText(), /Completed point/);
|
||||
assert.doesNotMatch(await page.locator('#page-content').innerText(), /New notes/);
|
||||
await login('reader');
|
||||
await page.waitForFunction(() => document.querySelector('.space-list .space-cover')?.naturalWidth === 1);
|
||||
await page.goto(`${detail}?page=${scenario.next_slug}`);
|
||||
assert.match(await page.locator('#page-content').innerText(), /New notes/);
|
||||
await page.waitForFunction(() => document.querySelector('#page-content img')?.naturalWidth === 1);
|
||||
|
|
@ -143,6 +145,7 @@ try {
|
|||
const denied = await page.goto(`${detail}pages/${scenario.next_slug}/edit/`);
|
||||
assert.equal(denied.status(), 403);
|
||||
await login('outsider');
|
||||
assert.equal(await page.locator('.space-list .space-cover').count(), 0);
|
||||
const forbidden = await page.goto(`${detail}?page=${scenario.next_slug}`);
|
||||
assert.equal(forbidden.status(), 404);
|
||||
assert.equal(await page.locator('#page-content').count(), 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue