Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Update a site to Atomic #23

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from
Open

Update a site to Atomic #23

wants to merge 5 commits into from

Conversation

guarani
Copy link
Contributor

@guarani guarani commented Mar 18, 2021

Proposed Changes

The classic editor is deprecated and is now being removed for Simple sites (except when editing existing posts with classic content or when using the iOS share extension).

This means that on Simple sites, the site settings screen will no longer have a "Enable block editor" switch. WPiOS has a UI test suite, EditorAztecTests, that runs on a mock Simple site ("Tri-County Real Estate") and which tests various features of the classic editor.

Since the classic editor is going away for Simple sites, it's necessary to update this. I think it makes sense to make EditorAztecTests run on an Atomic site instead of a Simple site. On WPiOS, this mock site is used for all other UI tests, so this has the side-effect of switching all WPiOS UI tests to run on a mock Atomic site instead of a mock Simple site.

The same could be true for WPAndroid and the same considerations might apply. That said, there appears to be an on-going effort to make WordPressMocks platform-specific (see here), so if it's OK, I'll make this change for WPiOS now and leave WPAndroid for later.

To Test

WordPress Android:

This change is WPiOS-specific so it's my understanding that testing with Android won't be needed at this stage (correct me if I'm wrong here).

WordPress iOS:

Ensure wordpress-mobile/WordPress-iOS#15766, which points to this PR branch, passes all UI tests.

cc @wordpress-mobile/platform-9

jtreanor and others added 5 commits June 13, 2019 11:13
The [classic editor is deprecated](wordpress-mobile/WordPress-iOS#16008) and is [now being removed](wordpress-mobile/WordPress-iOS#15766) for Simple sites (except when editing existing posts with classic content or when using the iOS share extension).

This means that on Simple sites, the site settings screen will no longer have a "Enable block editor" switch. WPiOS has a UI test suite, `EditorAztecTests`, that runs on a mock Simple site ("Tri-County Real Estate") and tests various features of the classic editor.

Since the classic editor is going away for Simple sites, I think it makes sense to make `EditorAztecTests` run on an Atomic site instead of a Simple site. On WPiOS, this mock site is used for all other UI tests, so this has the side-effect of switching all WPiOS UI tests to run on a mock Atomic site instead of a mock Simple site. The same could be true for WPAndroid and the same considerations might apply.
@guarani
Copy link
Contributor Author

guarani commented Mar 19, 2021

Instead of simply updating the values in the JSON files manually, I wonder if I should locate the actual site, switch it over to Atomic, and re-capture the relevant network requests. Otherwise, there could be JSON attributes that change when a site is converted to Atomic that I would miss with the current approach.

@mokagio
Copy link
Contributor

mokagio commented Mar 23, 2021

Instead of simply updating the values in the JSON files manually, I wonder if I should locate the actual site, switch it over to Atomic

Great idea automating that. If you script that, please commit the script as well so we can learn and reuse.

@guarani
Copy link
Contributor Author

guarani commented Mar 24, 2021

Instead of simply updating the values in the JSON files manually, I wonder if I should locate the actual site, switch it over to Atomic

Great idea automating that. If you script that, please commit the script as well so we can learn and reuse.

I didn't mean to imply I'd automate any of this 😅 I was just pondering whether instead of modifying these existing network responses (JSON files) to "convert" the sites from Simple to Atomic, I should instead actually switch the real site over to Atomic and re-capture the requests manually and update them here. That way I'd ensure the JSON stays up-to-date with the site that these network requests belong to.

@jkmassel
Copy link
Contributor

switch the real site over to Atomic and re-capture the requests manually and update them here

This would be a preferable approach for now, yes! Otherwise it'll certainly just come back to bite us later 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants