Skip to content

Commit

Permalink
Add visual test for add to cart button (#22489)
Browse files Browse the repository at this point in the history
* Add visual test for add to cart button

* Update screenshots for add to cart

* Update screenshots for add to cart

* Update screenshots for add to cart

* Update plugins/Marketplace/tests/UI/Marketplace_spec.js

Co-authored-by: Marc Neudert <[email protected]>

* Change CSS to support older browsers, fix broken HTML

* Build vue files

* retrigger checks

* Add images for screenshot tests

* Delete old screenshots with incorrect name

---------

Co-authored-by: Marc Neudert <[email protected]>
Co-authored-by: caddoo <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2024
1 parent 1f4a64c commit f8315a8
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 59 deletions.
4 changes: 3 additions & 1 deletion plugins/Marketplace/stylesheets/plugin-details.less
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,13 @@
color: #5bb75b;
font-size: 12px;
font-weight: bold;
display: inline-block;
display: flex;
text-align: right;
flex-grow: 1;
flex-shrink: 1;
flex-wrap: wrap;
align-content: center;
justify-content: flex-end;
padding-right: 1rem;
}

Expand Down
9 changes: 9 additions & 0 deletions plugins/Marketplace/tests/UI/Marketplace_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ describe("Marketplace", function () {
await captureWithPluginDetails('paid_plugin_details_valid_license_' + mode + '_installed');
});

it('should show an add to cart button with user selector', async function() {
setEnvironment(mode, noLicense);

var isFree = false;
await loadPluginDetailPage('Paid Plugin 1', isFree);

await captureWithPluginDetails('paid_plugin_details_add_to_cart_' + mode);
});

it('should show paid plugin details when having valid license', async function() {
setEnvironment(mode, exceededLicense);

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
109 changes: 53 additions & 56 deletions plugins/Marketplace/vue/dist/Marketplace.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plugins/Marketplace/vue/dist/Marketplace.umd.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
numUsers
)}`"
v-model="selectedPluginShopVariationUrl"
@change="changeSelectedPluginShopVariationUrl">
@change="changeSelectedPluginShopVariationUrl"
>
<option v-for="(variation, index) in plugin.shop.variations" :key="`var-${index}`"
:value="variation.addToCartUrl"
Expand Down

0 comments on commit f8315a8

Please sign in to comment.