Skip to content

Commit

Permalink
Merge branch 'main' into qag-242-Fix-false-positive-slack-messages-if…
Browse files Browse the repository at this point in the history
…-tests-did-not-execute
  • Loading branch information
Cloud11PL authored Oct 10, 2024
2 parents d7e0dfb + 8ea03e8 commit a8f7736
Show file tree
Hide file tree
Showing 105 changed files with 430 additions and 2,110 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-teachers-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Add e2e for managing products on draft order. Add e2e for placing draft order for non-existing customer.
5 changes: 5 additions & 0 deletions .changeset/eight-actors-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Enable by default feature flag for discount rules. Remove feature flags for product and order expression filters, so that expression filter will always show. Cleanup dead code after remove feature flags.
5 changes: 5 additions & 0 deletions .changeset/late-pants-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---

Always add comment after tests to CORE release PR, even if previous job fails.
5 changes: 5 additions & 0 deletions .changeset/loud-weeks-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Assigning product to shipping method weight rate no more cause error
5 changes: 5 additions & 0 deletions .changeset/tall-trainers-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Modals in the Dashboard have been aligned, so that all contains close button
2 changes: 1 addition & 1 deletion .featureFlags/discounts-rules.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: discounts_rules
displayName: Discounts rules
enabled: false
enabled: true
payload: "default"
visible: true
---
Expand Down
38 changes: 5 additions & 33 deletions .featureFlags/generated.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// @ts-nocheck

import L19499 from "./images/discounts-list.png"
import I59669 from "./images/improved_refunds.png"
import M04994 from "./images/order-filters.png"
import C77988 from "./images/filters.png"
import R80834 from "./images/discounts-list.png"
import E27647 from "./images/improved_refunds.png"

const discounts_rules = () => (<><p><img src={L19499} alt="Discount rules"/></p>
const discounts_rules = () => (<><p><img src={R80834} alt="Discount rules"/></p>
<p>Apply the new discounts rules to narrow your promotions audience.
Set up conditions and channels that must be fulfilled to apply defined reward.</p>
</>)
const improved_refunds = () => (<><p><img src={I59669} alt="Improved refunds"/></p>
const improved_refunds = () => (<><p><img src={E27647} alt="Improved refunds"/></p>
<h3 id="enable-the-enhanced-refund-feature-to-streamline-your-refund-process">Enable the enhanced refund feature to streamline your refund process:</h3>
<ul>
<li><p>• Choose between automatic calculations based on selected items or enter refund amounts directly for overcharges and custom adjustments.</p>
Expand All @@ -18,14 +16,6 @@ const improved_refunds = () => (<><p><img src={I59669} alt="Improved refunds"/><
</li>
</ul>

</>)
const order_filters = () => (<><p><img src={M04994} alt="new filters"/></p>
<p>Experience the new look and enhanced abilities of new orders filtering mechanism.
Easily combine any criteria you want, and quickly browse their values.</p>
</>)
const product_filters = () => (<><p><img src={C77988} alt="new filters"/></p>
<p>Experience the new look and enhanced abilities of new fitering mechanism.
Easily combine any criteria you want, and quickly browse their values.</p>
</>)

export const AVAILABLE_FLAGS = [{
Expand All @@ -34,7 +24,7 @@ export const AVAILABLE_FLAGS = [{
component: discounts_rules,
visible: true,
content: {
enabled: false,
enabled: true,
payload: "default",
}
},{
Expand All @@ -46,22 +36,4 @@ export const AVAILABLE_FLAGS = [{
enabled: true,
payload: "default",
}
},{
name: "order_filters",
displayName: "Orders filtering",
component: order_filters,
visible: true,
content: {
enabled: true,
payload: "default",
}
},{
name: "product_filters",
displayName: "Products filtering",
component: product_filters,
visible: true,
content: {
enabled: true,
payload: "default",
}
}] as const;
12 changes: 0 additions & 12 deletions .featureFlags/order-filters.md

This file was deleted.

12 changes: 0 additions & 12 deletions .featureFlags/product-filters.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
secrets: inherit

add-comment-to-release-pr:
if: ${{ !cancelled() }}
needs: run-tests-on-release
runs-on: ubuntu-22.04
steps:
Expand Down
64 changes: 0 additions & 64 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -848,10 +848,6 @@
"context": "navigator command mode description",
"string": "Search Command"
},
"3Z8972": {
"context": "product",
"string": "Stock quantity"
},
"3a5wL8": {
"string": "Active"
},
Expand Down Expand Up @@ -1316,10 +1312,6 @@
"context": "order history message",
"string": "Note was added to the order"
},
"6Y1nQd": {
"context": "product is visible",
"string": "Visible"
},
"6aBkJm": {
"context": "section header",
"string": "Authorization"
Expand Down Expand Up @@ -2058,10 +2050,6 @@
"BvGp1I": {
"string": "between"
},
"Bx367s": {
"context": "product is hidden",
"string": "Hidden"
},
"By5ZBp": {
"context": "header",
"string": "Hello there, {userName}"
Expand Down Expand Up @@ -3314,10 +3302,6 @@
"context": "csv file exporting has finished, header",
"string": "Exporting CSV finished"
},
"JUQwne": {
"context": "order",
"string": "Gift Card"
},
"JV+EiM": {
"context": "voucher value",
"string": "Value"
Expand All @@ -3330,10 +3314,6 @@
"context": "button",
"string": "Create Menu"
},
"JYvf8/": {
"context": "is preorder",
"string": "Preorder"
},
"Ja7gHc": {
"context": "button",
"string": "Edit"
Expand Down Expand Up @@ -3490,10 +3470,6 @@
"context": "quantity of fulfilled products",
"string": "Quantity to fulfill"
},
"Kgxlsf": {
"context": "order",
"string": "Paid with Gift Card"
},
"KkufwD": {
"string": "No voucher codes found"
},
Expand Down Expand Up @@ -4251,10 +4227,6 @@
"Pyjarj": {
"string": "This shipping rate has no postal codes assigned"
},
"PzXIXh": {
"context": "order",
"string": "Customer"
},
"Q/Nbku": {
"context": "product field",
"string": "Type"
Expand Down Expand Up @@ -4689,10 +4661,6 @@
"context": "product filter label",
"string": "Product"
},
"Sna+WK": {
"context": "product status",
"string": "Out Of Stock"
},
"SpngiS": {
"context": "sale status",
"string": "Status"
Expand Down Expand Up @@ -5856,10 +5824,6 @@
"context": "draft created from replace products list title",
"string": "Products replaced"
},
"a4qX2+": {
"context": "order",
"string": "Created"
},
"a55zOn": {
"context": "section header",
"string": "Data privacy"
Expand Down Expand Up @@ -6128,10 +6092,6 @@
"context": "voucher requirement",
"string": "Minimal order value"
},
"biAxKR": {
"context": "click and collect",
"string": "Click&Collect"
},
"biDgQS": {
"context": "button, opens modal to create transaction in order",
"string": "Manual transaction"
Expand Down Expand Up @@ -6421,10 +6381,6 @@
"context": "products export type label",
"string": "products"
},
"diOQm7": {
"context": "product status",
"string": "Available"
},
"dnbJKr": {
"string": "This transaction doesn't have any events"
},
Expand Down Expand Up @@ -6725,10 +6681,6 @@
"fzpXvv": {
"string": "Are you sure you want to remove {email} avatar?"
},
"g+GAf4": {
"context": "product visibility",
"string": "Visibility"
},
"g/BrOt": {
"string": "Url has invalid format"
},
Expand Down Expand Up @@ -7521,10 +7473,6 @@
"context": "table head",
"string": "Variant Name"
},
"lJP1iw": {
"context": "order",
"string": "Channel"
},
"lJXkFS": {
"context": "discount name",
"string": "Discount name"
Expand Down Expand Up @@ -8056,10 +8004,6 @@
"pAwBtz": {
"string": "Reward value"
},
"pBTTtU": {
"context": "product kind",
"string": "Product Kind"
},
"pC6/1z": {
"string": "Invalid manifest format"
},
Expand Down Expand Up @@ -8115,10 +8059,6 @@
"paa4m0": {
"string": "Successfully created product type"
},
"pbGIUg": {
"context": "sales channel",
"string": "Channel"
},
"phAZoj": {
"string": "Collection"
},
Expand Down Expand Up @@ -8464,10 +8404,6 @@
"context": "limit voucher",
"string": "Limit of Uses"
},
"s5v6m0": {
"context": "order",
"string": "Gift Card ordered"
},
"s6lW8R": {
"context": "option label",
"string": "Change address"
Expand Down
5 changes: 5 additions & 0 deletions playwright/pages/pageElements/rightSideDetailsSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ export class RightSideDetailsPage extends BasePage {
await this.waitForDOMToFullyLoad();
}

async typeAndSelectCustomerEmail(customerEmail = "[email protected]") {
await this.searchCustomerInput.fill(customerEmail);
await this.selectCustomerOption.locator(`text=${customerEmail}`).click();
}

async selectOneChannelAsAvailableWhenMoreSelected(channel: string) {
await this.manageChannelsButton.click();
await this.channelSelectDialog.clickAllChannelsCheckbox();
Expand Down
26 changes: 26 additions & 0 deletions playwright/tests/orders.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { FulfillmentPage } from "@pages/fulfillmentPage";
import { OrdersPage } from "@pages/ordersPage";
import { RefundPage } from "@pages/refundPage";
import { expect, test } from "@playwright/test";
import * as faker from "faker";

test.use({ storageState: "./playwright/.auth/admin.json" });

Expand Down Expand Up @@ -444,3 +445,28 @@ test(`TC: SALEOR_216 Order type discount is applied to a draft order @draft @dis

expect(finalTotalPrice.slice(3)).toContain(discountedOrderSubTotal.toString());
});

test("TC: SALEOR_217 Complete basic order for non existing customer @e2e @order", async () => {
const nonExistingEmail = `customer-${faker.datatype.number()}@example.com`;
const newAddress = ADDRESS.addressPL;

await ordersPage.goToOrdersListView();
await ordersPage.clickCreateOrderButton();
await ordersPage.orderCreateDialog.completeOrderCreateDialogWithFirstChannel();
await ordersPage.clickAddProductsButton();
await draftOrdersPage.addProductsDialog.selectVariantBySKU(variantSKU);
await draftOrdersPage.addProductsDialog.clickConfirmButton();
await ordersPage.rightSideDetailsPage.clickEditCustomerButton();
await ordersPage.rightSideDetailsPage.clickSearchCustomerInput();
await ordersPage.rightSideDetailsPage.typeAndSelectCustomerEmail(nonExistingEmail);
await addressForm.completeBasicInfoAddressForm(newAddress);
await addressForm.typeCompanyName(newAddress.companyName);
await addressForm.typePhone(newAddress.phone);
await addressForm.typeAddressLine2(newAddress.addressLine2);
await addressDialog.clickConfirmButton();
await ordersPage.expectSuccessBanner();
await ordersPage.clickAddShippingCarrierButton();
await ordersPage.shippingAddressDialog.pickAndConfirmFirstShippingMethod();
await ordersPage.clickFinalizeButton();
await draftOrdersPage.expectSuccessBannerMessage("finalized");
});
10 changes: 1 addition & 9 deletions src/apps/components/AppDialog/AppDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ export const AppDialog: React.FC<AppDialogProps> = ({ children, title, onClose,
return (
<DashboardModal aria-labelledby="extension app dialog" {...props} onChange={onClose}>
<DashboardModal.Content size="lg">
<DashboardModal.Title
display="flex"
justifyContent="space-between"
alignItems="center"
as="h2"
>
{title}
<DashboardModal.Close onClose={onClose}></DashboardModal.Close>
</DashboardModal.Title>
<DashboardModal.Header as="h2">{title}</DashboardModal.Header>
<Box width="100%" __height={600}>
{children}
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const AppPermissionsDialog = ({
return (
<DashboardModal open={true} onChange={onClose}>
<DashboardModal.Content size="sm">
<DashboardModal.Title>{formatMessage(messages.heading)}</DashboardModal.Title>
<DashboardModal.Header>{formatMessage(messages.heading)}</DashboardModal.Header>
<Box display={"grid"} gridAutoFlow={"row"}>
<Text as={"p"}>{formatMessage(messages.info)}</Text>
<Box
Expand Down
Loading

0 comments on commit a8f7736

Please sign in to comment.