WordPress.org

Make WordPress Core

Opened 4 weeks ago

Last modified 3 weeks ago

#52895 new enhancement

Overview of e2e tests to be written

Reported by: isabel_brison Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description

#49507 adds e2e tests for the edit posts page. The goal is to write tests for all the admin, but we should be clear on which parts need most testing and what exactly to test. To kick things off, I'm making a list of all the pages, some of the tests we should write, and some questions that occurred to me. Feedback on what to add, change or remove is very welcome!

Dashboard:

  • Quick draft section: add title, save draft, navigate to posts page and check it's there.

Updates page: not sure how we should test this one.

Categories:

  • Add new category: add name, click add new category button, check if it appears in list
  • Check that bulk deleting all categories leaves “uncategorized” untouched
  • Add child category
  • Delete category
  • Search for category
  • Search for non-existing category

Tags: same as categories.

Media:

  • Add image to library
  • Edit image alt text, title, desc
  • Search for image
  • Search for non-existing image

Pages: same as posts (see #49507)

Comments:

  • Create post, view it, add a comment, check that it displays in comments page.

Themes:

  • Search for a theme
  • Activate a theme
  • Delete a theme, then search for it
  • Add new theme and activate it

Customize: this is pretty theme-dependent, so we should pick a theme and check a few flows on it.

Widgets and Menus: might not be worth writing tests yet as these screens are being re-written.

Theme editor:

  • Add a line of CSS in the theme stylesheet and check for it in the front end?

Plugins: how should we test this page?

Users:

  • Add new user
  • Search for user
  • change user role
  • Check admin user can't change itself to subscriber

Profile: there are lots of options here, should we test changes to each of them? Some may not be relevant, e.g. profile pic just takes us to Gravatar.

Import: We could test whether the plugins install correctly, but any further than that should be unnecessary (the plugins should have their own tests)

Export/Export personal data: would it be worth trying to check the contents of the downloaded files?

Site health: there's no real interaction on this page, so maybe we can skip it.

Erase personal data: not sure how to test this one.

Settings: like profile, lots of options here. Test each individually?

Change History (4)

This ticket was mentioned in Slack in #core-test by isabelbrison. View the logs.


4 weeks ago

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


4 weeks ago

#3 @francina
4 weeks ago

Dropping some links I mentioned this morning on Dev Chat here, so everything is under one roof :)

Thanks :🙌

#4 @dariak
3 weeks ago

Hello! The overview looks very good!
Here are some of my ideas on this:

Updates page:

  • expected WordPress version is shown
  • Plugins, Themes and Translations sections are present

Themes (additions to already suggested use cases):

  • check that the current/default Theme is active

Theme editor (additions to already suggested use cases):

  • just simply add "hello world" output on a homepage (it can be easier to assert)

Plugins:

  • search for a plugin, install it, activate and deactivate

Profile:

  • change default data and save changes

Export/Export personal data:
I think it is enough to check that a download is triggered.

Erase personal data:

  • have a test user created in setUp of test data, search for this user, and check that this user appears in Requester. I do not think the real request needs to be executed and tested on this step

Settings:
I would check here all the defaults which are filled in for all Settings options.

Note: See TracTickets for help on using tickets.