Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Tests/Acceptance-Playwright/Tests/backend_module_log.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {test, expect} from '@playwright/test';
import * as helpers from './helpers';

test('Can crawl manually in log module, and keep selected log depth', async ({page}) => {
await helpers.loginBackend(page)
await helpers.addQueueEntries(page, 'default', '99');
await helpers.openCrawlerModuleCrawlerLog(page)
await page.locator('iframe[name="list_frame"]').contentFrame().getByText('Crawler log').isVisible();
await page.locator('iframe[name="list_frame"]').contentFrame().locator('.refreshLink').first().isVisible();
await page.locator('iframe[name="list_frame"]').contentFrame().locator('select[name="logDepth"]').selectOption('3');
await expect(page.locator('iframe[name="list_frame"]').contentFrame().locator('select[name="logDepth"]')).toHaveValue('3');
await page.locator('iframe[name="list_frame"]').contentFrame().locator('.refreshLink').first().click();
await page.locator('iframe[name="list_frame"]').contentFrame().locator('select[name="logDepth"]').isVisible();
await expect(page.locator('iframe[name="list_frame"]').contentFrame().locator('select[name="logDepth"]')).valueOf('3');
});
12 changes: 12 additions & 0 deletions Tests/Acceptance-Playwright/Tests/helpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {expect} from "@playwright/test";

export async function loginBackend(page) {
await page.goto('/typo3/');
await page.fill('input#t3-username', 'admin');
Expand All @@ -21,3 +23,13 @@ export async function openCrawlerModuleCrawlerLog(page) {
await page.goto('/typo3/module/page/crawler/log?id=1');
}

export async function addQueueEntries(page, config, depth = '0') {
await openCrawlerModuleStartCrawling(page)
await page.locator('div.node:nth-child(2)').click();
await expect(page.locator('#nprogress')).toHaveCount(0);
await page.locator('iframe[name="list_frame"]').contentFrame().locator('select[name="configurationSelection[]"]').selectOption(config);
await page.locator('iframe[name="list_frame"]').contentFrame().locator('select[name="crawlingDepth"]').selectOption(depth);
await page.locator('iframe[name="list_frame"]').contentFrame().getByRole('button', {name: 'Crawl URLs'}).click();
await expect(page.locator('#nprogress')).toHaveCount(0);
}

Loading