diff --git a/packages/core/admin/admin/src/pages/MarketplacePage/tests/__snapshots__/index.test.js.snap b/packages/core/admin/admin/src/pages/MarketplacePage/tests/__snapshots__/index.test.js.snap index 815c99c992..4b308d9026 100644 --- a/packages/core/admin/admin/src/pages/MarketplacePage/tests/__snapshots__/index.test.js.snap +++ b/packages/core/admin/admin/src/pages/MarketplacePage/tests/__snapshots__/index.test.js.snap @@ -1,6 +1,4102 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Marketplace page renders and matches the snapshot 1`] = ` +exports[`Marketplace page - common layout renders and matches the snapshot 1`] = ` +.c17 { + padding-bottom: 16px; + width: 25%; +} + +.c29 { + padding-bottom: 16px; +} + +.c51 { + padding-top: 4px; + padding-bottom: 4px; +} + +.c64 { + border-radius: 4px; + width: 64px; + height: 64px; +} + +.c65 { + padding-top: 16px; +} + +.c68 { + padding-top: 8px; +} + +.c78 { + margin-left: 4px; + width: 24px; + height: auto; +} + +.c79 { + padding-left: 16px; +} + +.c82 { + padding-top: 32px; +} + +.c59 { + font-weight: 600; + color: #32324d; + font-size: 0.75rem; + line-height: 1.33; +} + +.c56 { + padding-right: 8px; +} + +.c52 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + cursor: pointer; + padding: 8px; + border-radius: 4px; + background: #ffffff; + border: 1px solid #dcdce4; + position: relative; + outline: none; +} + +.c52 svg { + height: 12px; + width: 12px; +} + +.c52 svg > g, +.c52 svg path { + fill: #ffffff; +} + +.c52[aria-disabled='true'] { + pointer-events: none; +} + +.c52:after { + -webkit-transition-property: all; + transition-property: all; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; + border-radius: 8px; + content: ''; + position: absolute; + top: -4px; + bottom: -4px; + left: -4px; + right: -4px; + border: 2px solid transparent; +} + +.c52:focus-visible { + outline: none; +} + +.c52:focus-visible:after { + border-radius: 8px; + content: ''; + position: absolute; + top: -5px; + bottom: -5px; + left: -5px; + right: -5px; + border: 2px solid #4945ff; +} + +.c57 { + height: 100%; +} + +.c53 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: 8px 16px; + background: #4945ff; + border: 1px solid #4945ff; + border: 1px solid #dcdce4; + background: #ffffff; +} + +.c53 .c55 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c53 .c58 { + color: #ffffff; +} + +.c53[aria-disabled='true'] { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c53[aria-disabled='true'] .c58 { + color: #666687; +} + +.c53[aria-disabled='true'] svg > g, +.c53[aria-disabled='true'] svg path { + fill: #666687; +} + +.c53[aria-disabled='true']:active { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c53[aria-disabled='true']:active .c58 { + color: #666687; +} + +.c53[aria-disabled='true']:active svg > g, +.c53[aria-disabled='true']:active svg path { + fill: #666687; +} + +.c53:hover { + background-color: #f6f6f9; +} + +.c53:active { + background-color: #eaeaef; +} + +.c53 .c58 { + color: #32324d; +} + +.c53 svg > g, +.c53 svg path { + fill: #32324d; +} + +.c75 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: 8px 16px; + background: #4945ff; + border: 1px solid #4945ff; + border: 1px solid #d9d8ff; + background: #f0f0ff; +} + +.c75 .c55 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c75 .c58 { + color: #ffffff; +} + +.c75[aria-disabled='true'] { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c75[aria-disabled='true'] .c58 { + color: #666687; +} + +.c75[aria-disabled='true'] svg > g, +.c75[aria-disabled='true'] svg path { + fill: #666687; +} + +.c75[aria-disabled='true']:active { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c75[aria-disabled='true']:active .c58 { + color: #666687; +} + +.c75[aria-disabled='true']:active svg > g, +.c75[aria-disabled='true']:active svg path { + fill: #666687; +} + +.c75:hover { + background-color: #ffffff; +} + +.c75:active { + background-color: #ffffff; + border: 1px solid #4945ff; +} + +.c75:active .c58 { + color: #4945ff; +} + +.c75:active svg > g, +.c75:active svg path { + fill: #4945ff; +} + +.c75 .c58 { + color: #271fe0; +} + +.c75 svg > g, +.c75 svg path { + fill: #271fe0; +} + +.c36 { + padding-bottom: 16px; +} + +.c62 { + background: #ffffff; + padding-top: 16px; + padding-right: 16px; + padding-bottom: 16px; + padding-left: 16px; + border-radius: 4px; + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); + height: 100%; +} + +.c83 { + background: #ffffff; + padding: 24px; + border-radius: 4px; + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); +} + +.c84 { + background: #f6ecfc; + padding: 12px; + border-radius: 4px; +} + +.c37 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + gap: 8px; +} + +.c63 { + -webkit-align-items: normal; + -webkit-box-align: normal; + -ms-flex-align: normal; + align-items: normal; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c67 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c76 { + color: #328048; + margin-left: 8px; +} + +.c80 { + color: #328048; + margin-right: 8px; + width: 12; + height: 12; +} + +.c90 { + color: #666687; + margin-left: 8px; + width: 12px; + height: 12px; +} + +.c77 path { + fill: #328048; +} + +.c91 path { + fill: #666687; +} + +.c25 { + padding-right: 8px; + padding-left: 12px; +} + +.c21 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c23 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c20 { + font-weight: 600; + color: #32324d; + font-size: 0.75rem; + line-height: 1.33; +} + +.c28 { + border: none; + border-radius: 4px; + padding-bottom: 0.65625rem; + padding-left: 0; + padding-right: 16px; + padding-top: 0.65625rem; + color: #32324d; + font-weight: 400; + font-size: 0.875rem; + display: block; + width: 100%; + background: inherit; +} + +.c28::-webkit-input-placeholder { + color: #8e8ea9; + opacity: 1; +} + +.c28::-moz-placeholder { + color: #8e8ea9; + opacity: 1; +} + +.c28:-ms-input-placeholder { + color: #8e8ea9; + opacity: 1; +} + +.c28::placeholder { + color: #8e8ea9; + opacity: 1; +} + +.c28[aria-disabled='true'] { + color: inherit; +} + +.c28:focus { + outline: none; + box-shadow: none; +} + +.c24 { + border: 1px solid #dcdce4; + border-radius: 4px; + background: #ffffff; + outline: none; + box-shadow: 0; + -webkit-transition-property: border-color,box-shadow,fill; + transition-property: border-color,box-shadow,fill; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +.c24:focus-within { + border: 1px solid #4945ff; + box-shadow: #4945ff 0px 0px 0px 2px; +} + +.c19 { + border: 0; + -webkit-clip: rect(0 0 0 0); + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +.c27 { + font-size: 0.8rem; +} + +.c27 svg path { + fill: #32324d; +} + +.c18 { + border-radius: 4px; + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); + outline: none; + box-shadow: 0; + -webkit-transition-property: border-color,box-shadow,fill; + transition-property: border-color,box-shadow,fill; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +.c18:focus-within .c26 svg path { + fill: #4945ff; +} + +.c18 .c22 { + border: 1px solid transparent; +} + +.c18 .c22:focus-within { + border: 1px solid #4945ff; + box-shadow: #4945ff 0px 0px 0px 2px; +} + +.c43 { + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + width: 100%; + background: transparent; + border: none; +} + +.c43:focus { + outline: none; +} + +.c43[aria-disabled='true'] { + cursor: not-allowed; +} + +.c46 { + padding-right: 16px; + padding-left: 16px; +} + +.c48 { + padding-left: 12px; +} + +.c39 { + -webkit-align-items: stretch; + -webkit-box-align: stretch; + -ms-flex-align: stretch; + align-items: stretch; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + +.c41 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c44 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c47 { + color: #32324d; + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 0.875rem; + line-height: 1.43; +} + +.c40 > * { + margin-top: 0; + margin-bottom: 0; +} + +.c42 { + position: relative; + border: 1px solid #dcdce4; + padding-right: 12px; + border-radius: 4px; + background: #ffffff; + overflow: hidden; + min-height: 2rem; + outline: none; + box-shadow: 0; + -webkit-transition-property: border-color,box-shadow,fill; + transition-property: border-color,box-shadow,fill; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +.c42:focus-within { + border: 1px solid #4945ff; + box-shadow: #4945ff 0px 0px 0px 2px; +} + +.c49 { + background: transparent; + border: none; + position: relative; + z-index: 1; +} + +.c49 svg { + height: 0.6875rem; + width: 0.6875rem; +} + +.c49 svg path { + fill: #666687; +} + +.c50 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + background: none; + border: none; +} + +.c50 svg { + width: 0.375rem; +} + +.c45 { + width: 100%; +} + +.c71 { + padding-top: 24px; +} + +.c72 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c86 { + -webkit-align-items: stretch; + -webkit-box-align: stretch; + -ms-flex-align: stretch; + align-items: stretch; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + +.c87 > * { + margin-top: 0; + margin-bottom: 0; +} + +.c73 > * { + margin-left: 0; + margin-right: 0; +} + +.c73 > * + * { + margin-left: 8px; +} + +.c66 { + color: #32324d; + font-weight: 500; + font-size: 1rem; + line-height: 1.25; +} + +.c69 { + color: #666687; + font-size: 0.875rem; + line-height: 1.43; +} + +.c81 { + font-weight: 600; + color: #328048; + font-size: 0.875rem; + line-height: 1.43; +} + +.c88 { + font-weight: 500; + color: #32324d; + font-size: 0.75rem; + line-height: 1.33; +} + +.c14 { + font-weight: 600; + color: #32324d; + font-size: 0.75rem; + line-height: 1.33; +} + +.c12 { + padding-right: 8px; +} + +.c74 { + padding-left: 8px; +} + +.c9 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + cursor: pointer; + padding: 8px; + border-radius: 4px; + background: #ffffff; + border: 1px solid #dcdce4; + position: relative; + outline: none; +} + +.c9 svg { + height: 12px; + width: 12px; +} + +.c9 svg > g, +.c9 svg path { + fill: #ffffff; +} + +.c9[aria-disabled='true'] { + pointer-events: none; +} + +.c9:after { + -webkit-transition-property: all; + transition-property: all; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; + border-radius: 8px; + content: ''; + position: absolute; + top: -4px; + bottom: -4px; + left: -4px; + right: -4px; + border: 2px solid transparent; +} + +.c9:focus-visible { + outline: none; +} + +.c9:focus-visible:after { + border-radius: 8px; + content: ''; + position: absolute; + top: -5px; + bottom: -5px; + left: -5px; + right: -5px; + border: 2px solid #4945ff; +} + +.c8 { + cursor: pointer; +} + +.c10 { + padding: 8px 16px; + background: #4945ff; + border: 1px solid #4945ff; + border-radius: 4px; + border: 1px solid #dcdce4; + background: #ffffff; + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-text-decoration: none; + text-decoration: none; +} + +.c10 .c11 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c10 .c13 { + color: #ffffff; +} + +.c10[aria-disabled='true'] { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c10[aria-disabled='true'] .c13 { + color: #666687; +} + +.c10[aria-disabled='true'] svg > g, +.c10[aria-disabled='true'] svg path { + fill: #666687; +} + +.c10[aria-disabled='true']:active { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c10[aria-disabled='true']:active .c13 { + color: #666687; +} + +.c10[aria-disabled='true']:active svg > g, +.c10[aria-disabled='true']:active svg path { + fill: #666687; +} + +.c10:hover { + background-color: #f6f6f9; +} + +.c10:active { + background-color: #eaeaef; +} + +.c10 .c13 { + color: #32324d; +} + +.c10 svg > g, +.c10 svg path { + fill: #32324d; +} + +.c85 { + margin-right: 24px; +} + +.c85 svg { + width: 2rem; + height: 2rem; +} + +.c89 { + word-break: break-all; +} + +.c1 { + padding-bottom: 56px; +} + +.c4 { + background: #f6f6f9; + padding-top: 40px; + padding-right: 56px; + padding-bottom: 40px; + padding-left: 56px; +} + +.c16 { + padding-right: 56px; + padding-left: 56px; +} + +.c0 { + display: grid; + grid-template-columns: 1fr; +} + +.c2 { + overflow-x: hidden; +} + +.c5 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c6 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c7 { + color: #32324d; + font-weight: 600; + font-size: 2rem; + line-height: 1.25; +} + +.c15 { + color: #666687; + font-size: 1rem; + line-height: 1.5; +} + +.c3:focus-visible { + outline: none; +} + +.c33 { + color: #4945ff; + font-weight: 600; + font-size: 0.6875rem; + line-height: 1.45; + text-transform: uppercase; +} + +.c35 { + color: #666687; + font-weight: 600; + font-size: 0.6875rem; + line-height: 1.45; + text-transform: uppercase; +} + +.c31 { + padding: 16px; +} + +.c32 { + border-bottom: 2px solid #4945ff; +} + +.c34 { + border-bottom: 2px solid transparent; +} + +.c30[aria-disabled='true'] { + cursor: not-allowed; +} + +.c60 { + display: grid; + grid-template-columns: repeat(12,1fr); + gap: 16px; +} + +.c61 { + grid-column: span 4; + max-width: 100%; +} + +.c70 { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.c38 { + font-weight: 500; +} + +.c38 span { + font-size: 0.75rem; +} + +.c54 { + height: 2rem; +} + +@media (max-width:68.75rem) { + .c61 { + grid-column: span 6; + } +} + +@media (max-width:34.375rem) { + .c61 { + grid-column: span 12; + } +} + +
+
+
+
+
+
+
+

+ Marketplace +

+
+ + + + Submit plugin + + +
+

+ Get more out of Strapi +

+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ Comments logo +
+

+
+ Comments +
+

+
+
+

+ Powerful Strapi based comments moderation tool for you and your users +

+
+
+
+ + + Learn more + + + + +
+
+
+
+
+
+
+
+ Config Sync logo +
+

+
+ Config Sync + +
+ + + +
+
+
+

+
+
+

+ Migrate your config data across environments using the CLI or Strapi admin panel. +

+
+
+
+ + + Learn more + + + + +
+
+
+
+
+
+
+
+ Content Versioning logo +
+

+
+ Content Versioning +
+

+
+
+

+ This plugin enables you to versioning Content Types. It allows multiple draft versions✅ Keeps history of all changes (with time travel) ✅ +

+
+
+
+ + + Learn more + + + + +
+
+
+
+
+
+
+
+ Documentation logo +
+

+
+ Documentation + +
+ Made by Strapi +
+
+
+

+
+
+

+ Create an OpenAPI Document and visualize your API with SWAGGER UI +

+
+
+
+ + + Learn more + + + +
+ + + + + Installed + +
+
+
+
+
+
+
+
+
+ Transformer logo +
+

+
+ Transformer +
+

+
+
+

+ A plugin for Strapi Headless CMS that provides the ability to transform the API response. +

+
+
+
+ + + Learn more + + + + +
+
+
+
+
+
+
+
+
+ +
+
+ + + + +
+
+
+ + Documentation + + + + +
+ + Tell us what plugin you are looking for and we'll let our community plugin developers know in case they are in search for inspiration! + +
+
+
+
+
+ + + +`; + +exports[`Marketplace page - layout renders the correct online layout 1`] = ` +.c17 { + padding-bottom: 16px; + width: 25%; +} + +.c29 { + padding-bottom: 16px; +} + +.c51 { + padding-top: 4px; + padding-bottom: 4px; +} + +.c64 { + border-radius: 4px; + width: 64px; + height: 64px; +} + +.c65 { + padding-top: 16px; +} + +.c68 { + padding-top: 8px; +} + +.c78 { + margin-left: 4px; + width: 24px; + height: auto; +} + +.c79 { + padding-left: 16px; +} + +.c82 { + padding-top: 32px; +} + +.c59 { + font-weight: 600; + color: #32324d; + font-size: 0.75rem; + line-height: 1.33; +} + +.c56 { + padding-right: 8px; +} + +.c52 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + cursor: pointer; + padding: 8px; + border-radius: 4px; + background: #ffffff; + border: 1px solid #dcdce4; + position: relative; + outline: none; +} + +.c52 svg { + height: 12px; + width: 12px; +} + +.c52 svg > g, +.c52 svg path { + fill: #ffffff; +} + +.c52[aria-disabled='true'] { + pointer-events: none; +} + +.c52:after { + -webkit-transition-property: all; + transition-property: all; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; + border-radius: 8px; + content: ''; + position: absolute; + top: -4px; + bottom: -4px; + left: -4px; + right: -4px; + border: 2px solid transparent; +} + +.c52:focus-visible { + outline: none; +} + +.c52:focus-visible:after { + border-radius: 8px; + content: ''; + position: absolute; + top: -5px; + bottom: -5px; + left: -5px; + right: -5px; + border: 2px solid #4945ff; +} + +.c57 { + height: 100%; +} + +.c53 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: 8px 16px; + background: #4945ff; + border: 1px solid #4945ff; + border: 1px solid #dcdce4; + background: #ffffff; +} + +.c53 .c55 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c53 .c58 { + color: #ffffff; +} + +.c53[aria-disabled='true'] { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c53[aria-disabled='true'] .c58 { + color: #666687; +} + +.c53[aria-disabled='true'] svg > g, +.c53[aria-disabled='true'] svg path { + fill: #666687; +} + +.c53[aria-disabled='true']:active { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c53[aria-disabled='true']:active .c58 { + color: #666687; +} + +.c53[aria-disabled='true']:active svg > g, +.c53[aria-disabled='true']:active svg path { + fill: #666687; +} + +.c53:hover { + background-color: #f6f6f9; +} + +.c53:active { + background-color: #eaeaef; +} + +.c53 .c58 { + color: #32324d; +} + +.c53 svg > g, +.c53 svg path { + fill: #32324d; +} + +.c75 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: 8px 16px; + background: #4945ff; + border: 1px solid #4945ff; + border: 1px solid #d9d8ff; + background: #f0f0ff; +} + +.c75 .c55 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c75 .c58 { + color: #ffffff; +} + +.c75[aria-disabled='true'] { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c75[aria-disabled='true'] .c58 { + color: #666687; +} + +.c75[aria-disabled='true'] svg > g, +.c75[aria-disabled='true'] svg path { + fill: #666687; +} + +.c75[aria-disabled='true']:active { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c75[aria-disabled='true']:active .c58 { + color: #666687; +} + +.c75[aria-disabled='true']:active svg > g, +.c75[aria-disabled='true']:active svg path { + fill: #666687; +} + +.c75:hover { + background-color: #ffffff; +} + +.c75:active { + background-color: #ffffff; + border: 1px solid #4945ff; +} + +.c75:active .c58 { + color: #4945ff; +} + +.c75:active svg > g, +.c75:active svg path { + fill: #4945ff; +} + +.c75 .c58 { + color: #271fe0; +} + +.c75 svg > g, +.c75 svg path { + fill: #271fe0; +} + +.c36 { + padding-bottom: 16px; +} + +.c62 { + background: #ffffff; + padding-top: 16px; + padding-right: 16px; + padding-bottom: 16px; + padding-left: 16px; + border-radius: 4px; + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); + height: 100%; +} + +.c83 { + background: #ffffff; + padding: 24px; + border-radius: 4px; + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); +} + +.c84 { + background: #f6ecfc; + padding: 12px; + border-radius: 4px; +} + +.c37 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + gap: 8px; +} + +.c63 { + -webkit-align-items: normal; + -webkit-box-align: normal; + -ms-flex-align: normal; + align-items: normal; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c67 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c76 { + color: #328048; + margin-left: 8px; +} + +.c80 { + color: #328048; + margin-right: 8px; + width: 12; + height: 12; +} + +.c90 { + color: #666687; + margin-left: 8px; + width: 12px; + height: 12px; +} + +.c77 path { + fill: #328048; +} + +.c91 path { + fill: #666687; +} + +.c25 { + padding-right: 8px; + padding-left: 12px; +} + +.c21 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c23 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c20 { + font-weight: 600; + color: #32324d; + font-size: 0.75rem; + line-height: 1.33; +} + +.c28 { + border: none; + border-radius: 4px; + padding-bottom: 0.65625rem; + padding-left: 0; + padding-right: 16px; + padding-top: 0.65625rem; + color: #32324d; + font-weight: 400; + font-size: 0.875rem; + display: block; + width: 100%; + background: inherit; +} + +.c28::-webkit-input-placeholder { + color: #8e8ea9; + opacity: 1; +} + +.c28::-moz-placeholder { + color: #8e8ea9; + opacity: 1; +} + +.c28:-ms-input-placeholder { + color: #8e8ea9; + opacity: 1; +} + +.c28::placeholder { + color: #8e8ea9; + opacity: 1; +} + +.c28[aria-disabled='true'] { + color: inherit; +} + +.c28:focus { + outline: none; + box-shadow: none; +} + +.c24 { + border: 1px solid #dcdce4; + border-radius: 4px; + background: #ffffff; + outline: none; + box-shadow: 0; + -webkit-transition-property: border-color,box-shadow,fill; + transition-property: border-color,box-shadow,fill; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +.c24:focus-within { + border: 1px solid #4945ff; + box-shadow: #4945ff 0px 0px 0px 2px; +} + +.c19 { + border: 0; + -webkit-clip: rect(0 0 0 0); + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +.c27 { + font-size: 0.8rem; +} + +.c27 svg path { + fill: #32324d; +} + +.c18 { + border-radius: 4px; + box-shadow: 0px 1px 4px rgba(33,33,52,0.1); + outline: none; + box-shadow: 0; + -webkit-transition-property: border-color,box-shadow,fill; + transition-property: border-color,box-shadow,fill; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +.c18:focus-within .c26 svg path { + fill: #4945ff; +} + +.c18 .c22 { + border: 1px solid transparent; +} + +.c18 .c22:focus-within { + border: 1px solid #4945ff; + box-shadow: #4945ff 0px 0px 0px 2px; +} + +.c43 { + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + width: 100%; + background: transparent; + border: none; +} + +.c43:focus { + outline: none; +} + +.c43[aria-disabled='true'] { + cursor: not-allowed; +} + +.c46 { + padding-right: 16px; + padding-left: 16px; +} + +.c48 { + padding-left: 12px; +} + +.c39 { + -webkit-align-items: stretch; + -webkit-box-align: stretch; + -ms-flex-align: stretch; + align-items: stretch; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + +.c41 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c44 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c47 { + color: #32324d; + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 0.875rem; + line-height: 1.43; +} + +.c40 > * { + margin-top: 0; + margin-bottom: 0; +} + +.c42 { + position: relative; + border: 1px solid #dcdce4; + padding-right: 12px; + border-radius: 4px; + background: #ffffff; + overflow: hidden; + min-height: 2rem; + outline: none; + box-shadow: 0; + -webkit-transition-property: border-color,box-shadow,fill; + transition-property: border-color,box-shadow,fill; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +.c42:focus-within { + border: 1px solid #4945ff; + box-shadow: #4945ff 0px 0px 0px 2px; +} + +.c49 { + background: transparent; + border: none; + position: relative; + z-index: 1; +} + +.c49 svg { + height: 0.6875rem; + width: 0.6875rem; +} + +.c49 svg path { + fill: #666687; +} + +.c50 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + background: none; + border: none; +} + +.c50 svg { + width: 0.375rem; +} + +.c45 { + width: 100%; +} + +.c71 { + padding-top: 24px; +} + +.c72 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c86 { + -webkit-align-items: stretch; + -webkit-box-align: stretch; + -ms-flex-align: stretch; + align-items: stretch; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + +.c87 > * { + margin-top: 0; + margin-bottom: 0; +} + +.c73 > * { + margin-left: 0; + margin-right: 0; +} + +.c73 > * + * { + margin-left: 8px; +} + +.c66 { + color: #32324d; + font-weight: 500; + font-size: 1rem; + line-height: 1.25; +} + +.c69 { + color: #666687; + font-size: 0.875rem; + line-height: 1.43; +} + +.c81 { + font-weight: 600; + color: #328048; + font-size: 0.875rem; + line-height: 1.43; +} + +.c88 { + font-weight: 500; + color: #32324d; + font-size: 0.75rem; + line-height: 1.33; +} + +.c14 { + font-weight: 600; + color: #32324d; + font-size: 0.75rem; + line-height: 1.33; +} + +.c12 { + padding-right: 8px; +} + +.c74 { + padding-left: 8px; +} + +.c9 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + cursor: pointer; + padding: 8px; + border-radius: 4px; + background: #ffffff; + border: 1px solid #dcdce4; + position: relative; + outline: none; +} + +.c9 svg { + height: 12px; + width: 12px; +} + +.c9 svg > g, +.c9 svg path { + fill: #ffffff; +} + +.c9[aria-disabled='true'] { + pointer-events: none; +} + +.c9:after { + -webkit-transition-property: all; + transition-property: all; + -webkit-transition-duration: 0.2s; + transition-duration: 0.2s; + border-radius: 8px; + content: ''; + position: absolute; + top: -4px; + bottom: -4px; + left: -4px; + right: -4px; + border: 2px solid transparent; +} + +.c9:focus-visible { + outline: none; +} + +.c9:focus-visible:after { + border-radius: 8px; + content: ''; + position: absolute; + top: -5px; + bottom: -5px; + left: -5px; + right: -5px; + border: 2px solid #4945ff; +} + +.c8 { + cursor: pointer; +} + +.c10 { + padding: 8px 16px; + background: #4945ff; + border: 1px solid #4945ff; + border-radius: 4px; + border: 1px solid #dcdce4; + background: #ffffff; + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-text-decoration: none; + text-decoration: none; +} + +.c10 .c11 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.c10 .c13 { + color: #ffffff; +} + +.c10[aria-disabled='true'] { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c10[aria-disabled='true'] .c13 { + color: #666687; +} + +.c10[aria-disabled='true'] svg > g, +.c10[aria-disabled='true'] svg path { + fill: #666687; +} + +.c10[aria-disabled='true']:active { + border: 1px solid #dcdce4; + background: #eaeaef; +} + +.c10[aria-disabled='true']:active .c13 { + color: #666687; +} + +.c10[aria-disabled='true']:active svg > g, +.c10[aria-disabled='true']:active svg path { + fill: #666687; +} + +.c10:hover { + background-color: #f6f6f9; +} + +.c10:active { + background-color: #eaeaef; +} + +.c10 .c13 { + color: #32324d; +} + +.c10 svg > g, +.c10 svg path { + fill: #32324d; +} + +.c85 { + margin-right: 24px; +} + +.c85 svg { + width: 2rem; + height: 2rem; +} + +.c89 { + word-break: break-all; +} + +.c1 { + padding-bottom: 56px; +} + +.c4 { + background: #f6f6f9; + padding-top: 40px; + padding-right: 56px; + padding-bottom: 40px; + padding-left: 56px; +} + +.c16 { + padding-right: 56px; + padding-left: 56px; +} + +.c0 { + display: grid; + grid-template-columns: 1fr; +} + +.c2 { + overflow-x: hidden; +} + +.c5 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c6 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c7 { + color: #32324d; + font-weight: 600; + font-size: 2rem; + line-height: 1.25; +} + +.c15 { + color: #666687; + font-size: 1rem; + line-height: 1.5; +} + +.c3:focus-visible { + outline: none; +} + +.c33 { + color: #4945ff; + font-weight: 600; + font-size: 0.6875rem; + line-height: 1.45; + text-transform: uppercase; +} + +.c35 { + color: #666687; + font-weight: 600; + font-size: 0.6875rem; + line-height: 1.45; + text-transform: uppercase; +} + +.c31 { + padding: 16px; +} + +.c32 { + border-bottom: 2px solid #4945ff; +} + +.c34 { + border-bottom: 2px solid transparent; +} + +.c30[aria-disabled='true'] { + cursor: not-allowed; +} + +.c60 { + display: grid; + grid-template-columns: repeat(12,1fr); + gap: 16px; +} + +.c61 { + grid-column: span 4; + max-width: 100%; +} + +.c70 { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.c38 { + font-weight: 500; +} + +.c38 span { + font-size: 0.75rem; +} + +.c54 { + height: 2rem; +} + +@media (max-width:68.75rem) { + .c61 { + grid-column: span 6; + } +} + +@media (max-width:34.375rem) { + .c61 { + grid-column: span 12; + } +} + +
+
+
+
+
+
+
+

+ Marketplace +

+
+ + + + Submit plugin + + +
+

+ Get more out of Strapi +

+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ Comments logo +
+

+
+ Comments +
+

+
+
+

+ Powerful Strapi based comments moderation tool for you and your users +

+
+
+
+ + + Learn more + + + + +
+
+
+
+
+
+
+
+ Config Sync logo +
+

+
+ Config Sync + +
+ + + +
+
+
+

+
+
+

+ Migrate your config data across environments using the CLI or Strapi admin panel. +

+
+
+
+ + + Learn more + + + + +
+
+
+
+
+
+
+
+ Content Versioning logo +
+

+
+ Content Versioning +
+

+
+
+

+ This plugin enables you to versioning Content Types. It allows multiple draft versions✅ Keeps history of all changes (with time travel) ✅ +

+
+
+
+ + + Learn more + + + + +
+
+
+
+
+
+
+
+ Documentation logo +
+

+
+ Documentation + +
+ Made by Strapi +
+
+
+

+
+
+

+ Create an OpenAPI Document and visualize your API with SWAGGER UI +

+
+
+
+ + + Learn more + + + +
+ + + + + Installed + +
+
+
+
+
+
+
+
+
+ Transformer logo +
+

+
+ Transformer +
+

+
+
+

+ A plugin for Strapi Headless CMS that provides the ability to transform the API response. +

+
+
+
+ + + Learn more + + + + +
+
+
+
+
+
+
+
+
+ +
+
+ + + + +
+
+
+ + Documentation + + + + +
+ + Tell us what plugin you are looking for and we'll let our community plugin developers know in case they are in search for inspiration! + +
+
+
+
+
+ + + +`; + +exports[`Marketplace page - layout shows online layout 1`] = ` .c17 { padding-bottom: 16px; width: 25%; diff --git a/packages/core/admin/admin/src/pages/MarketplacePage/tests/index.test.js b/packages/core/admin/admin/src/pages/MarketplacePage/tests/index.test.js index 0dcf4a4fc4..c7ecf518af 100644 --- a/packages/core/admin/admin/src/pages/MarketplacePage/tests/index.test.js +++ b/packages/core/admin/admin/src/pages/MarketplacePage/tests/index.test.js @@ -1,7 +1,6 @@ import React from 'react'; import { render, waitFor, waitForElementToBeRemoved, screen } from '@testing-library/react'; import { IntlProvider } from 'react-intl'; -import userEvent from '@testing-library/user-event'; import { QueryClient, QueryClientProvider } from 'react-query'; import { ThemeProvider, lightTheme } from '@strapi/design-system'; import { useTracking, useAppInfos } from '@strapi/helper-plugin'; @@ -55,40 +54,62 @@ const App = ( ); -describe('Marketplace page', () => { +const waitForReload = async () => { + await waitForElementToBeRemoved(() => screen.getByTestId('loader')); + await waitFor(() => + expect(screen.getByRole('heading', { name: /marketplace/i })).toBeInTheDocument() + ); +}; + +describe('Marketplace page - layout', () => { beforeAll(() => server.listen()); afterEach(() => server.resetHandlers()); afterAll(() => server.close()); - it('renders and matches the snapshot', async () => { - // Check snapshot - const { container, getByTestId, getByRole } = render(App); - await waitForElementToBeRemoved(() => getByTestId('loader')); - await waitFor(() => expect(getByRole('heading', { name: /marketplace/i })).toBeInTheDocument()); - - expect(container.firstChild).toMatchSnapshot(); - }); - - it('sends a single tracking event when the user enters the marketplace', () => { + it('redners the online layout', async () => { const trackUsage = jest.fn(); useTracking.mockImplementation(() => ({ trackUsage })); - render(App); + const { container } = render(App); + await waitForReload(); + // Check snapshot + expect(container.firstChild).toMatchSnapshot(); + // Calls the tracking event expect(trackUsage).toHaveBeenCalledWith('didGoToMarketplace'); expect(trackUsage).toHaveBeenCalledTimes(1); + const offlineText = screen.queryByText('You are offline'); + expect(offlineText).toEqual(null); + // Shows the sort button + const sortButton = screen.getByRole('button', { name: /Sort by/i }); + expect(sortButton).toBeVisible(); + // Shows the filters button + const filtersButton = screen.getByRole('button', { name: /filters/i }); + expect(filtersButton).toBeVisible(); }); - it('handles production environment', () => { + it('renders the offline layout', async () => { + useNavigatorOnLine.mockReturnValueOnce(false); + render(App); + + const offlineText = screen.getByText('You are offline'); + + expect(offlineText).toBeVisible(); + }); + + it('handles production environment', async () => { + client.clear(); // Simulate production environment - useAppInfos.mockImplementationOnce(() => ({ + useAppInfos.mockImplementation(() => ({ autoReload: false, dependencies: {}, useYarn: true, })); - const { queryByText } = render(App); + render(App); + + await waitForReload(); // Should display notification expect(toggleNotification).toHaveBeenCalledWith({ type: 'info', @@ -98,53 +119,8 @@ describe('Marketplace page', () => { }, blockTransition: true, }); - expect(toggleNotification).toHaveBeenCalledTimes(1); - // Should not show install buttons - expect(queryByText(/copy install command/i)).not.toBeInTheDocument(); - }); - - it('shows an online layout', () => { - render(App); - const offlineText = screen.queryByText('You are offline'); - - expect(offlineText).toEqual(null); - }); - - it('shows the offline layout', () => { - useNavigatorOnLine.mockReturnValueOnce(false); - render(App); - const offlineText = screen.getByText('You are offline'); - - expect(offlineText).toBeVisible(); - }); - - it('shows the sort by menu', () => { - render(App); - const sortButton = screen.getByRole('button', { name: /Sort by/i }); - expect(sortButton).toBeVisible(); - }); - - it('shows the correct options on sort select', () => { - render(App); - const sortButton = screen.getByRole('button', { name: /Sort by/i }); - userEvent.click(sortButton); - - const alphabeticalOption = screen.getByRole('option', { name: 'Alphabetical order' }); - const newestOption = screen.getByRole('option', { name: 'Newest' }); - - expect(alphabeticalOption).toBeVisible(); - expect(newestOption).toBeVisible(); - }); - - it('changes the url on sort option select', () => { - render(App); - const sortButton = screen.getByRole('button', { name: /Sort by/i }); - userEvent.click(sortButton); - - const newestOption = screen.getByRole('option', { name: 'Newest' }); - userEvent.click(newestOption); - expect(history.location.search).toEqual('?sort=submissionDate:desc'); + expect(screen.queryByText(/copy install command/i)).not.toBeInTheDocument(); }); }); diff --git a/packages/core/admin/admin/src/pages/MarketplacePage/tests/plugins.test.js b/packages/core/admin/admin/src/pages/MarketplacePage/tests/plugins.test.js index f5a45fa5a7..f2b4d57af6 100644 --- a/packages/core/admin/admin/src/pages/MarketplacePage/tests/plugins.test.js +++ b/packages/core/admin/admin/src/pages/MarketplacePage/tests/plugins.test.js @@ -56,7 +56,7 @@ const waitForReload = async () => { ); }; -describe('Plugins tab', () => { +describe('Marketplace page - plugins tab', () => { let renderedContainer; let history; @@ -381,4 +381,24 @@ describe('Plugins tab', () => { userEvent.click(screen.getByRole('tab', { name: /plugins/i })); expect(collectionCards.length).toBe(2); }); + + it('shows the correct options on sort select', () => { + const sortButton = screen.getByRole('button', { name: /Sort by/i }); + userEvent.click(sortButton); + + const alphabeticalOption = screen.getByRole('option', { name: 'Alphabetical order' }); + const newestOption = screen.getByRole('option', { name: 'Newest' }); + + expect(alphabeticalOption).toBeVisible(); + expect(newestOption).toBeVisible(); + }); + + it('changes the url on sort option select', () => { + const sortButton = screen.getByRole('button', { name: /Sort by/i }); + userEvent.click(sortButton); + + const newestOption = screen.getByRole('option', { name: 'Newest' }); + userEvent.click(newestOption); + expect(history.location.search).toEqual('?sort=submissionDate:desc'); + }); }); diff --git a/packages/core/admin/admin/src/pages/MarketplacePage/tests/providers.test.js b/packages/core/admin/admin/src/pages/MarketplacePage/tests/providers.test.js index 315611ede9..f61fb2eb70 100644 --- a/packages/core/admin/admin/src/pages/MarketplacePage/tests/providers.test.js +++ b/packages/core/admin/admin/src/pages/MarketplacePage/tests/providers.test.js @@ -277,4 +277,24 @@ describe('Providers tab', () => { userEvent.click(screen.getByRole('tab', { name: /providers/i })); expect(collectionCards.length).toBe(2); }); + + it('shows the correct options on sort select', () => { + const sortButton = screen.getByRole('button', { name: /Sort by/i }); + userEvent.click(sortButton); + + const alphabeticalOption = screen.getByRole('option', { name: 'Alphabetical order' }); + const newestOption = screen.getByRole('option', { name: 'Newest' }); + + expect(alphabeticalOption).toBeVisible(); + expect(newestOption).toBeVisible(); + }); + + it('changes the url on sort option select', () => { + const sortButton = screen.getByRole('button', { name: /Sort by/i }); + userEvent.click(sortButton); + + const newestOption = screen.getByRole('option', { name: 'Newest' }); + userEvent.click(newestOption); + expect(history.location.search).toEqual('?npmPackageType=provider&sort=submissionDate:desc'); + }); });