HEX
Server: Apache/2
System: Linux server-27-254-144-72.da.direct 5.10.0-33-amd64 #1 SMP Debian 5.10.226-1 (2024-10-03) x86_64
User: pokaorgani (1114)
PHP: 8.1.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/pokaorgani/public_html/wp-content/themes/sydney/tests/footer/footer.spec.js
// @ts-check
const { test, expect } = require('@playwright/test');

import { is_pro } from '../utils/pro';

//Test if the sidebar exists on various pages
test.describe('Footer tests', () => {

	//Copyright bar is visible
	test('Copyright bar is visible', async ({ page }) => {
		await page.goto('http://tests.local/');
		await expect(page.locator( '#colophon' )).toBeVisible(); 
	});

	//Footer widgets are visible
	test('Footer widgets are visible', async ({ page }) => {
		await page.goto('http://tests.local/');
		await expect(page.locator( '#sidebar-footer' )).toBeVisible(); 
	});

	//Four footer areas
	test('Four footer areas are displayed', async ({ page }) => {
		await page.goto('http://tests.local/');
		await expect(page.locator( '.sidebar-column' )).toHaveCount(4); 
	} );

	//Credits are visible and have text
	test('Credits are visible and have text', async ({ page }) => {
		await page.goto('http://tests.local/');
		await expect(page.locator( '.sydney-credits' )).toBeVisible();
		await expect(page.locator( '.sydney-credits' )).not.toBeEmpty();
	} );

	//Social profile is visible
	test('Social profile is visible', async ({ page }) => {
		await page.goto('http://tests.local/');
		await expect(page.locator( '.social-profile' )).toBeVisible();
	} );

	if ( is_pro ) {
		//Footer separator is visible
		test('Footer separator is visible', async ({ page }) => {
			await page.goto('http://tests.local/');
			await expect(page.locator( '.footer-separator' )).toBeVisible();
		} );

		//Pre-footer is visible
		test('Pre-footer separator is visible', async ({ page }) => {
			await page.goto('http://tests.local/');
			await expect(page.locator( '.footer-contact' )).toBeVisible();
		} );		
	}
});