Make WordPress Core

Opened 5 years ago

Last modified 11 months ago

#48229 new defect (bug)

Console error when running QUnit Test Suite

Reported by: hareesh-pillai's profile Hareesh Pillai Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Build/Test Tools Keywords: close
Focuses: Cc:

Description

There is a 404 (Not Found) error reported in the browser console for the admin-ajax.php file while running QUnit Test Suite.

After selectively running the tests, I could narrow it down to the image widget control tests in the Image Media Widget module.

Although all the tests are passing, this error should be fixed.

Attachments (1)

Console error.png (228.0 KB) - added by Hareesh Pillai 5 years ago.
Screenshot of the console error

Download all attachments as: .zip

Change History (6)

@Hareesh Pillai
5 years ago

Screenshot of the console error

This ticket was mentioned in Slack in #core-js by hareesh-pillai. View the logs.


5 years ago

#2 @iandunn
4 years ago

  • Keywords reporter-feedback added

Hi Hareesh 👋🏻

It's working for me now, are you still seeing that error?

If so, it could be a routing issue with your web server, since the tests are setup a little weird. Here's my Nginx config:

server {
	listen       80;
	server_name  wp-develop.test;
	root         /Users/ian-work/vhosts/localhost/wp-develop.test/public_html/build;

	location /tests/ {
		root /Users/ian-work/vhosts/localhost/wp-develop.test/public_html/;
		try_files $uri $uri/ /wordpress/$uri /wordpress/index.php?$args;
	}

	# this is also necessary for qunit
	location /node_modules/ {
		root /Users/ian-work/vhosts/localhost/wp-develop.test/public_html/;
		try_files $uri $uri/ /wordpress/$uri /wordpress/index.php?$args;
	}
}

If routing isn't the problem, you could try opening them directly in your browser, with a URL like file:///Users/myusername/dev/develop.svn.wordpress.org/trunk/tests/qunit/index.html

#3 @Hareesh Pillai
4 years ago

  • Keywords reporter-feedback removed

Thanks for the comment @iandunn.

I still see the same error while running the tests from localhost. However, when I try running directly with the URL like you suggested, there is no console error.

This ticket was mentioned in Slack in #core by sergey. View the logs.


4 years ago

#5 @Hareesh Pillai
11 months ago

  • Keywords close added

Marking for close as I do not see the console error now.

Note: See TracTickets for help on using tickets.