Step 6 | Test your Business Solution on a Site

In this article, we'll test the poem-selling app that we spent the past 5 articles building.

In order to test the app, first make sure your server code is deployed and the server is live. Then, we need to build the app in Blocks:

  1. If you haven’t already, create a Wix site.

  2. In the top right corner of the Blocks editor, click Release, then click Release again in the modal that opens.

    Release a build

  3. Wait for your build to complete. A notification will appear on screen when the build is complete. Click Select a Site to open the site selector.

    Select a site to install your app on

  4. Select the site you want to test on. This opens the site editor. When the site loads, click Install App.

    Install the app on the site

    Wait while Wix adds the app to your site.

  5. Once the app is installed, the site editor will display the App Widgets section of Add Elements. Select the Item selector widget we created in Blocks and add it to the site page.

  6. Let’s check that all the components we added in Blocks are here. In the left menu, go to CMS > Your Collections. You’ll see the Poems collection we created in Blocks. If you open the collection, you’ll see that the items we created in Blocks still appear in the collection. This means that users who install your widget have default values that they can leave or edit.

  7. Now let’s look at the dashboard. Close the CMS and in the top left corner open the menu and click Dashboard.

    Go to the site dashboard

  8. In the dashboard menu, hover over Apps. You’ll see one of the dashboard pages we created, Poems Manager. Note that the Add a poem dashboard page doesn’t appear here, because we hid it.

    Locate the Poems Manager dashboard page

    Click Poems Manager to go to the dashboard page. Because our collection contains items, it displays the list of poems:

    Current Poems Manager dashboard page

  9. Let’s remove the current poems so that we can make sure our app recognizes the empty state. Click the icon button to remove each repeater item. We now see the empty state that we created:

    Display the empty state

  10. Next let’s add some poems to make sure the data functionality is working. Try clicking the + Add Poem button inside the card.

    When we click the button, the site navigates us to the Add a poem dashboard page.

    Add a Poem dashboard page

    Click Cancel and make sure the site navigates you back to Poems Manager in its empty state. Then, you can try out the Add a poem button in the top right corner to return to Add a poem.

    Enter some poem details and add and remove variants. When you’re done, click Save. The Poems Manager should now be in the nonempty state and display the poem you added:

    Poems Manager updated with new poem

    Add a couple more poems and then return to the site editor and open the CMS. Make sure the poems you entered all appear in the CMS.

  11. Now let’s test the item page. Exit out of the CMS and in the top right corner of the site editor click Publish. The site notifies you when publishing is complete. Click on View Site next to the URL to open the live site.

    Publish and view your test site

  12. Go to the site page where you added your widget and test the widget out to make sure it works properly. You should initially see just the first dropdown which displays the different poem titles in your Poems collection. Once you make a selection, the other 2 elements should appear:

    App widget in action

  13. Now we’ll test the call to the server. When we click Add to cart, Wix calls the Get Catalog Items method that we set up in our server code, because we’re updating the current cart.

    Click Add to cart. If we’ve done everything correctly, you should see the cart page with the poem we added, it’s price updated to reflect the requested number of lines:

    Cart page

  14. Test out the cart page by adjusting the number of lines, and make sure that the order price updates.

Congratulations! You’ve built a business solution and successfully integrated it with Wix eCommerce.

You can continue building your own business solution based on this example, or apply what you learned in this tutorial to an entirely new app.

See also

Did this help?