Skip to content

Comments

Fix failing e2e#6292

Merged
witoszekdev merged 25 commits intomainfrom
fix-e2e-notifiactions-check
Feb 3, 2026
Merged

Fix failing e2e#6292
witoszekdev merged 25 commits intomainfrom
fix-e2e-notifiactions-check

Conversation

@witoszekdev
Copy link
Member

@witoszekdev witoszekdev commented Jan 28, 2026

Fixed failing e2e tests:

  • added missing data-testid for notifications and DataGrid
  • fixed assertions after changes in notifications
  • improved selectors for discount buttons
  • fixed invalid usage of await
  • added more waitFor when interacting with UI
  • added awaits for requests made to Saleor
  • added fetching of order details when making mutations regarding order lines so that we render up-to-date values

Copilot AI review requested due to automatic review settings January 28, 2026 17:26
@changeset-bot
Copy link

changeset-bot bot commented Jan 28, 2026

🦋 Changeset detected

Latest commit: bc08fc7

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes failing e2e tests by enhancing mutation responses to fetch complete order details and adding missing test identifiers for UI elements.

Changes:

  • Updated GraphQL order line mutations to return a comprehensive OrderLinesUpdate fragment containing all fields that can change when order lines are modified (lines, pricing, shipping, discounts)
  • Added data-test-type attribute to Toast component and data-testid to DataGrid canvas for e2e test targeting
  • Updated Playwright selectors to use correct test identifiers

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/orders/mutations.ts Modified order line mutations to use OrderLinesUpdate fragment instead of minimal fields
src/fragments/orders.ts Added new OrderLinesUpdate fragment to fetch comprehensive order data that changes with line mutations
src/graphql/types.generated.ts Generated TypeScript types for new OrderLinesUpdate fragment
src/graphql/hooks.generated.ts Generated React hooks referencing OrderLinesUpdate fragment
src/orders/components/OrderSummary/OrderValue.tsx Refactored prop types to separate dynamic fields (LineUpdateFields) from static fields (StaticFields)
src/orders/components/OrderSummary/OrderValue.test.tsx Updated test props to include new required fields from OrderLinesUpdate fragment
src/orders/components/OrderSummary/OrderSummary.tsx Passed additional props (isShippingRequired, shippingMethods, shippingMethod) to OrderValue component
src/components/notifications/Toast.tsx Added data-test-type attribute for e2e test targeting
src/components/Datagrid/Datagrid.tsx Added data-testid="data-grid-canvas" for e2e test targeting
playwright/pages/productPage.ts Updated selector from product-available-in-channels-text to availability-card
playwright/data/copy.ts Updated expected text from "In 1 out of" to "In 1 of"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 42.58%. Comparing base (bbfdd97) to head (bc08fc7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/fragments/orders.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6292      +/-   ##
==========================================
- Coverage   42.58%   42.58%   -0.01%     
==========================================
  Files        2497     2497              
  Lines       43372    43373       +1     
  Branches    10231     9850     -381     
==========================================
  Hits        18470    18470              
- Misses      24865    24866       +1     
  Partials       37       37              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@witoszekdev witoszekdev added run pw-e2e Run e2e (basic suite from PR automation) test deployment Deploy Pull Request to *.saleor.rocks environment labels Jan 29, 2026
@github-actions github-actions bot temporarily deployed to pr-6292 January 29, 2026 15:11 Destroyed
Copilot AI review requested due to automatic review settings January 29, 2026 15:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 29, 2026 17:04
@github-actions
Copy link
Contributor

github-actions bot commented Jan 29, 2026

Differences Found

✅ No packages or licenses were added.

Summary

Expand
License Name Package Count Packages
0BSD 1
Packages
  • tslib
CC0-1.0 1
Packages
  • type-fest
MIT/X11 1
Packages
  • nub
MPL-1.1 1
Packages
  • harmony-reflect
MPL-2.0 1
Packages
  • dompurify
Public Domain 1
Packages
  • jsonify
Python-2.0 1
Packages
  • argparse
WTFPL 1
Packages
  • utf8-byte-length
<<missing>> 2
Packages
  • busboy
  • streamsearch
CC-BY-4.0 2
Packages
  • @saleor/macaw-ui
  • caniuse-lite
SEE LICENSE IN LICENSE 2
Packages
  • posthog-js
  • spawndamnit
BlueOak-1.0.0 4
Packages
  • glob
  • lru-cache
  • minimatch
  • path-scurry
BSD-2-Clause 23
Packages
  • browser-process-hrtime
  • css-select
  • css-what
  • domelementtype
  • domhandler
  • domutils
  • dotenv
  • dotenv-expand
  • entities
  • escodegen
  • eslint-scope
  • espree
  • esprima
  • esrecurse
  • estraverse
  • esutils
  • nth-check
  • regjsparser
  • stringify-object
  • terser
  • And 3 more...
BSD-3-Clause 42
Packages
  • @saleor/app-sdk
  • @sentry/cli
  • @sentry/cli-darwin
  • @sentry/cli-linux-arm
  • @sentry/cli-linux-arm64
  • @sentry/cli-linux-i686
  • @sentry/cli-linux-x64
  • @sentry/cli-win32-arm64
  • @sentry/cli-win32-i686
  • @sentry/cli-win32-x64
  • @sinonjs/commons
  • @sinonjs/fake-timers
  • abab
  • asn1js
  • babel-plugin-istanbul
  • chroma-js
  • dataloader
  • diff
  • esquery
  • exenv
  • And 22 more...
ISC 47
Packages
  • @istanbuljs/load-nyc-config
  • anymatch
  • boolbase
  • cli-width
  • cliui
  • electron-to-chromium
  • fastq
  • flatted
  • fs.realpath
  • get-caller-file
  • get-own-enumerable-property-symbols
  • glob
  • glob-parent
  • graceful-fs
  • inflight
  • inherits
  • ini
  • isexe
  • knip
  • lru-cache
  • And 27 more...
Apache-2.0 54
Packages
  • @editorjs/editorjs
  • @eslint/config-array
  • @eslint/config-helpers
  • @eslint/core
  • @eslint/object-schema
  • @eslint/plugin-kit
  • @humanfs/core
  • @humanfs/node
  • @humanwhocodes/module-importer
  • @humanwhocodes/retry
  • @opentelemetry/api
  • @opentelemetry/semantic-conventions
  • @playwright/test
  • @pollyjs/adapter
  • @pollyjs/core
  • @pollyjs/persister
  • @pollyjs/utils
  • @swc/core
  • @swc/core-darwin-arm64
  • @swc/core-darwin-x64
  • And 34 more...
MIT 1293
Packages
  • @adobe/css-tools
  • @apollo/client
  • @ardatan/relay-compiler
  • @ardatan/sync-fetch
  • @babel/code-frame
  • @babel/compat-data
  • @babel/core
  • @babel/generator
  • @babel/helper-annotate-as-pure
  • @babel/helper-compilation-targets
  • @babel/helper-create-class-features-plugin
  • @babel/helper-globals
  • @babel/helper-member-expression-to-functions
  • @babel/helper-module-imports
  • @babel/helper-module-transforms
  • @babel/helper-optimise-call-expression
  • @babel/helper-plugin-utils
  • @babel/helper-replace-supers
  • @babel/helper-skip-transparent-expression-wrappers
  • @babel/helper-string-parser
  • And 1273 more...

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@witoszekdev witoszekdev added test deployment Deploy Pull Request to *.saleor.rocks environment run pw-e2e Run e2e (basic suite from PR automation) and removed run pw-e2e Run e2e (basic suite from PR automation) test deployment Deploy Pull Request to *.saleor.rocks environment labels Jan 29, 2026
@github-actions github-actions bot temporarily deployed to pr-6292 January 30, 2026 14:50 Destroyed
Copilot AI review requested due to automatic review settings January 30, 2026 15:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@witoszekdev witoszekdev added run pw-e2e Run e2e (basic suite from PR automation) and removed run pw-e2e Run e2e (basic suite from PR automation) labels Jan 30, 2026
@witoszekdev witoszekdev marked this pull request as ready for review January 30, 2026 15:52
@witoszekdev witoszekdev requested a review from a team as a code owner January 30, 2026 15:52
@github-actions github-actions bot temporarily deployed to pr-6292 January 30, 2026 15:55 Destroyed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 27 out of 27 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@witoszekdev witoszekdev added run pw-e2e Run e2e (basic suite from PR automation) and removed run pw-e2e Run e2e (basic suite from PR automation) labels Feb 2, 2026
Copilot AI review requested due to automatic review settings February 3, 2026 10:24
@witoszekdev witoszekdev enabled auto-merge (squash) February 3, 2026 10:24
@witoszekdev witoszekdev merged commit 0bdad3e into main Feb 3, 2026
21 checks passed
@witoszekdev witoszekdev deleted the fix-e2e-notifiactions-check branch February 3, 2026 10:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.


return (
<Box
data-test-type={type}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The attribute name data-test-type is inconsistent with the naming convention used throughout the codebase. All other test identifiers use data-test-id. Consider using data-test-id="toast" and differentiating by the type value, or use a more specific name like data-test-id={toast-${type}} to maintain consistency with the rest of the codebase.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run pw-e2e Run e2e (basic suite from PR automation) test deployment Deploy Pull Request to *.saleor.rocks environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants