Tests have been commented out after implementing #3094829: Prevent submitting empty/unaccessible variants .

The module now checks if the sitemap output is not empty before submitting sitemaps and the tests fail because the kernel tests do not install the simple_sitemap db table. Anyway, I believe we will either have to convert the kernel tests into browser tests, or do some black magic like installing the simple_sitemap db table and indexing one URL and so on.

CommentFileSizeAuthor
#4 search-engine-annotation-3105922-4.patch464 bytesmluzitano
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gbyte.co created an issue. See original summary.

gbyte’s picture

gbyte’s picture

After installing the config and schema of simple_sitemap and running the generation process, the test fails apparently because \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\CustomUrlGenerator::processDataSet calls \Drupal\Core\Path\PathValidator::getUrlIfValidWithoutAccessCheck which returns false for the custom '/' URL in the kernel test environment. Not sure what has to be mocked/added for the path validator to work.

mluzitano’s picture

StatusFileSize
new464 bytes

I'm adding this patch because, while it doesn't directly resolve the issue with CustomUrlGenerator that you've listed above, it did prevent other unit tests from running locally, and I'm guessing it will be essential to fully resolving this issue. Essentially, last_submitted comes up in PHPUnit tests because it's not defined in the schema.yml file, since it looks to have been converted from configuration to a State.

gbyte’s picture

@mluzitano

Good point! I don't see the connection to this issue, so I created a new one: #3215552: Remove last_submitted config reference from simple_sitemap_engine entity.

gbyte’s picture

Version: 8.x-3.x-dev » 4.x-dev

walkingdexter made their first commit to this issue’s fork.

walkingdexter’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gbyte’s picture

This is awesome! However I feel like the sitemap ping functionality is being deprecated and we need to focus on IndexNow: #3512165: Create tests for simple_sitemap_engines (IndexNow)