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/blog/archive/blog-entry-title.spec.js
// @ts-check
const { test, expect } = require('@playwright/test');

test.describe('Blog post titles', () => {

	test('Post titles are visible', async ({ page }) => {
		await page.goto('http://tests.local/my-blog-page/');
		await expect(page.locator( '.content-area article' ).first().locator('.entry-title')).toBeVisible();
	} );

	test('Post titles have correct font sizes', async ({ page }) => {

		await page.goto('http://tests.local/my-blog-page/');

		await expect(page.locator( '.content-area article' ).first().locator('.entry-title')).toHaveCSS( 'font-size', '32px' );

		await page.setViewportSize({ width: 768, height: 1024 });
		await expect(page.locator( '.content-area article' ).first().locator('.entry-title')).toHaveCSS( 'font-size', '28px' );

		await page.setViewportSize({ width: 375, height: 812 });
		await expect(page.locator( '.content-area article' ).first().locator('.entry-title')).toHaveCSS( 'font-size', '24px' );
	} );

	test('Post titles have the correct color', async ({ page }) => {
		await page.goto('http://tests.local/my-blog-page/');
		await expect(page.locator( '.content-area article' ).first().locator('.entry-title a')).toHaveCSS( 'color', 'rgb(0, 16, 46)' );
	} );

});