File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
WooCommerce/WooCommerceTests/ViewRelated/Products/Edit Product Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -716,6 +716,23 @@ final class ProductFormViewModelTests: XCTestCase {
716716 // Then
717717 XCTAssertEqual ( actionButtons, [ . publish, . more] )
718718 }
719+
720+ func test_no_preview_button_for_existing_draft_product_on_site_with_no_preview_url( ) {
721+ // Given
722+ sessionManager. defaultSite = Site . fake ( ) . copy ( loginURL: " " , isWordPressComStore: true )
723+
724+ let product = Product . fake ( ) . copy ( productID: 123 , statusKey: ProductStatus . draft. rawValue)
725+ let viewModel = createViewModel ( product: product,
726+ formType: . edit,
727+ stores: stores,
728+ featureFlagService: MockFeatureFlagService ( isProductsOnboardingEnabled: true ) )
729+
730+ // When
731+ let actionButtons = viewModel. actionButtons
732+
733+ // Then
734+ XCTAssertEqual ( actionButtons, [ . publish, . more] )
735+ }
719736}
720737
721738private extension ProductFormViewModelTests {
You can’t perform that action at this time.
0 commit comments