Add loading icon and disable continue until free extensions are loaded (https://github.com/woocommerce/woocommerce-admin/pull/7979)

* Add loading icon and disable continue until free extensions are loaded.

* Add changelog

* Only show dropdown when we have installable extensions listed

* Revert spinner addition and add loading to Continue button

* Add wait for dropdown to be enabled
This commit is contained in:
louwie17 2021-12-03 11:03:44 -04:00 committed by GitHub
parent 7eeb77acc3
commit db29d8b571
3 changed files with 13 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: Fix
Fix Onboarding flow where extensions might not be selected and installed. #7979

View File

@ -284,6 +284,10 @@ export const SelectiveExtensionsBundle = ( {
</p>
<Button
className="woocommerce-admin__business-details__selective-extensions-bundle__expand"
disabled={
! installableExtensions ||
installableExtensions.length === 0
}
onClick={ () => {
setShowExtensions( ! showExtensions );
@ -340,8 +344,8 @@ export const SelectiveExtensionsBundle = ( {
onClick={ () => {
onSubmit( values );
} }
isBusy={ isInstallingActivating }
disabled={ isInstallingActivating }
isBusy={ isInstallingActivating || isResolving }
disabled={ isInstallingActivating || isResolving }
isPrimary
>
{ __( 'Continue', 'woocommerce-admin' ) }

View File

@ -50,6 +50,9 @@ export class BusinessSection extends BasePage {
const expandButtonSelector =
'.woocommerce-admin__business-details__selective-extensions-bundle__expand';
await this.page.waitForSelector(
expandButtonSelector + ':not([disabled])'
);
await this.click( expandButtonSelector );
// Confirm that expanding the list shows all the extensions available to install.