mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(post form): align rules prompt test with bottom placement (#1136)
This commit is contained in:
@@ -841,7 +841,7 @@ describe('PostForm', () => {
|
||||
expect(table?.textContent).toContain('file name.jpg');
|
||||
});
|
||||
|
||||
it('shows the rules and FAQ prompt below the file row with a board-specific rules link', async () => {
|
||||
it('shows the rules and FAQ prompt at the bottom of the form with a board-specific rules link', async () => {
|
||||
testState.resolvedCommunityAddress = 'music-posting.eth';
|
||||
|
||||
await renderPostForm('/mu');
|
||||
@@ -855,7 +855,8 @@ describe('PostForm', () => {
|
||||
const links = Array.from(promptRow?.querySelectorAll('a') || []);
|
||||
|
||||
expect(fileRowIndex).toBeGreaterThan(-1);
|
||||
expect(promptRowIndex).toBe(fileRowIndex + 1);
|
||||
expect(promptRowIndex).toBeGreaterThan(fileRowIndex);
|
||||
expect(promptRowIndex).toBe(rows.length - 1);
|
||||
expect(promptRow?.className).toBe('rules');
|
||||
expect(promptRow?.querySelector('ul')?.className).toBe('rules');
|
||||
expect(links.map((link) => link.textContent)).toEqual(['Rules', 'FAQ']);
|
||||
|
||||
Reference in New Issue
Block a user