-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: added mocked svg and new fixtures
test(lld): update screenshots (ubuntu-latest) lld, test, screenshot test(lld): update screenshots (macos-latest) lld, test, screenshot test(lld): update screenshots (windows-latest) lld, test, screenshot chore: removing redundant imports chore: removing screenshots for regeneration test(lld): update screenshots (ubuntu-latest) lld, test, screenshot test(lld): update screenshots (windows-latest) lld, test, screenshot
- Loading branch information
1 parent
cc14bd3
commit b7d3dc3
Showing
82 changed files
with
155 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { Page } from "@playwright/test"; | ||
import { test as base } from "./common"; | ||
import { getStatusMock } from "tests/specs/services/services-api-mocks/getStatus.mock"; | ||
|
||
type TestFixtures = { | ||
mockProviderSvgs: Page; | ||
mockFeesEndpoint: Page; | ||
mockSwapCancelledEndpoint: Page; | ||
mockSwapAcceptedEndpoint: Page; | ||
mockSwapStatusEndpoint: Page; | ||
}; | ||
|
||
export const test = base.extend<TestFixtures>({ | ||
mockProviderSvgs: async ({ page }, use) => { | ||
await page.route("https://cdn.live.ledger.com/icons/providers/boxed/**.svg", async route => { | ||
console.log("Mocking Provider icons"); | ||
route.fulfill({ | ||
headers: { teststatus: "mocked" }, | ||
path: "tests/mocks/dummy-provider-icon.svg", | ||
}); | ||
}); | ||
|
||
await use(page); | ||
}, | ||
|
||
mockFeesEndpoint: async ({ page }, use) => { | ||
await page.route( | ||
"https://explorers.api.live.ledger.com/blockchain/v4/btc/fees", | ||
async route => { | ||
console.log("Mocking Fees endpoint"); | ||
console.log("THE DATE: ", Date.now()); | ||
route.fulfill({ | ||
headers: { teststatus: "mocked" }, | ||
body: JSON.stringify({ "2": 15067, "4": 15067, "6": 15067, last_updated: Date.now() }), | ||
}); | ||
}, | ||
); | ||
|
||
await use(page); | ||
}, | ||
|
||
// We mock the 'cancelled' swap response because the transaction isn't broadcast when run locally. | ||
// If 'cancelled' is called then it's a successful test | ||
mockSwapCancelledEndpoint: async ({ page }, use) => { | ||
await page.route("https://swap.ledger.com/v5/swap/cancelled", async route => { | ||
console.log("Mocking swap cancelled HTTP response"); | ||
route.fulfill({ headers: { teststatus: "mocked" }, body: "" }); | ||
}); | ||
await use(page); | ||
}, | ||
|
||
mockSwapAcceptedEndpoint: async ({ page }, use) => { | ||
await page.route("https://swap.ledger.com/v5/swap/accepted", async route => { | ||
console.log("Mocking swap accepted HTTP response"); | ||
route.fulfill({ headers: { teststatus: "mocked" }, body: "" }); | ||
}); | ||
await use(page); | ||
}, | ||
|
||
mockSwapStatusEndpoint: async ({ page }, use) => { | ||
await page.route("https://swap.ledger.com/v5/swap/status", async route => { | ||
console.log("Mocking swap status HTTP response"); | ||
const mockStatusResponse = getStatusMock(); | ||
route.fulfill({ headers: { teststatus: "mocked" }, body: mockStatusResponse }); | ||
}); | ||
await use(page); | ||
}, | ||
}); | ||
|
||
export default test; |
24 changes: 24 additions & 0 deletions
24
apps/ledger-live-desktop/tests/mocks/dummy-provider-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.43 KB
(98%)
.../tests/specs/accounts/account.spec.ts-snapshots/LTC-firstAccountPage-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.25 KB
(98%)
...p/tests/specs/accounts/account.spec.ts-snapshots/LTC-firstAccountPage-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.35 KB
(98%)
...p/tests/specs/accounts/account.spec.ts-snapshots/LTC-firstAccountPage-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.43 KB
(98%)
.../tests/specs/accounts/account.spec.ts-snapshots/XRP-firstAccountPage-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.19 KB
(98%)
...p/tests/specs/accounts/account.spec.ts-snapshots/XRP-firstAccountPage-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.39 KB
(98%)
...p/tests/specs/accounts/account.spec.ts-snapshots/XRP-firstAccountPage-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.45 KB
(98%)
.../tests/specs/accounts/account.spec.ts-snapshots/XTZ-firstAccountPage-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.25 KB
(98%)
...p/tests/specs/accounts/account.spec.ts-snapshots/XTZ-firstAccountPage-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.41 KB
(98%)
...p/tests/specs/accounts/account.spec.ts-snapshots/XTZ-firstAccountPage-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-46.4 KB
...ests/specs/services/swap.spec.ts-snapshots/add-account-from-dropdown-darwin.png
Binary file not shown.
Binary file modified
BIN
-25 Bytes
(100%)
...tests/specs/services/swap.spec.ts-snapshots/add-account-from-dropdown-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-16 Bytes
(100%)
...tests/specs/services/swap.spec.ts-snapshots/add-account-from-dropdown-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-63.4 KB
...pecs/services/swap.spec.ts-snapshots/add-missing-destination-account-darwin.png
Binary file not shown.
Binary file modified
BIN
+199 Bytes
(100%)
...specs/services/swap.spec.ts-snapshots/add-missing-destination-account-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+58 Bytes
(100%)
...specs/services/swap.spec.ts-snapshots/add-missing-destination-account-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-87.1 KB
...op/tests/specs/services/swap.spec.ts-snapshots/add-to-account-button-darwin.png
Binary file not shown.
Binary file modified
BIN
-34 Bytes
(100%)
...top/tests/specs/services/swap.spec.ts-snapshots/add-to-account-button-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-24 Bytes
(100%)
...top/tests/specs/services/swap.spec.ts-snapshots/add-to-account-button-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-39.1 KB
...e-desktop/tests/specs/services/swap.spec.ts-snapshots/confirmed-swap-darwin.png
Binary file not shown.
Binary file removed
BIN
-84.1 KB
.../tests/specs/services/swap.spec.ts-snapshots/custom-fee-set-for-swap-darwin.png
Binary file not shown.
Binary file modified
BIN
+97 Bytes
(100%)
...p/tests/specs/services/swap.spec.ts-snapshots/custom-fee-set-for-swap-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+27 Bytes
(100%)
...p/tests/specs/services/swap.spec.ts-snapshots/custom-fee-set-for-swap-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-89 KB
...s/specs/services/swap.spec.ts-snapshots/eth-to-usdt-quotes-generated-darwin.png
Binary file not shown.
Binary file modified
BIN
-59 Bytes
(100%)
...ts/specs/services/swap.spec.ts-snapshots/eth-to-usdt-quotes-generated-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-123 Bytes
(100%)
...ts/specs/services/swap.spec.ts-snapshots/eth-to-usdt-quotes-generated-win32.png
Oops, something went wrong.
Binary file removed
BIN
-87.3 KB
...cs/services/swap.spec.ts-snapshots/fixed-centralised-quotes-diplayed-darwin.png
Diff not rendered.
Binary file modified
BIN
+18 Bytes
(100%)
...ecs/services/swap.spec.ts-snapshots/fixed-centralised-quotes-diplayed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-14 Bytes
(100%)
...ecs/services/swap.spec.ts-snapshots/fixed-centralised-quotes-diplayed-win32.png
Oops, something went wrong.
Binary file removed
BIN
-85.8 KB
...s/services/swap.spec.ts-snapshots/fixed-centralised-quotes-displayed-darwin.png
Diff not rendered.
Binary file removed
BIN
-84.1 KB
...cs/services/swap.spec.ts-snapshots/fixed-centralised-quotes-displayed-linux.png
Diff not rendered.
Binary file removed
BIN
-89.4 KB
...cs/services/swap.spec.ts-snapshots/fixed-centralised-quotes-displayed-win32.png
Diff not rendered.
Binary file removed
BIN
-80.3 KB
...services/swap.spec.ts-snapshots/fixed-decentralised-quotes-displayed-darwin.png
Diff not rendered.
Binary file modified
BIN
-4 Bytes
(100%)
.../services/swap.spec.ts-snapshots/fixed-decentralised-quotes-displayed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(100%)
.../services/swap.spec.ts-snapshots/fixed-decentralised-quotes-displayed-win32.png
Oops, something went wrong.
Binary file removed
BIN
-87.6 KB
...ervices/swap.spec.ts-snapshots/floating-centralised-quotes-displayed-darwin.png
Diff not rendered.
Binary file modified
BIN
+45 Bytes
(100%)
...services/swap.spec.ts-snapshots/floating-centralised-quotes-displayed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6 Bytes
(100%)
...services/swap.spec.ts-snapshots/floating-centralised-quotes-displayed-win32.png
Oops, something went wrong.
Binary file removed
BIN
-92 KB
...vices/swap.spec.ts-snapshots/floating-decentralised-quotes-displayed-darwin.png
Diff not rendered.
Binary file modified
BIN
-59 Bytes
(100%)
...rvices/swap.spec.ts-snapshots/floating-decentralised-quotes-displayed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-110 Bytes
(100%)
...rvices/swap.spec.ts-snapshots/floating-decentralised-quotes-displayed-win32.png
Oops, something went wrong.
Binary file removed
BIN
-63.1 KB
...s/specs/services/swap.spec.ts-snapshots/from-account-dropdown-opened-darwin.png
Diff not rendered.
Binary file removed
BIN
-57.2 KB
...ve-desktop/tests/specs/services/swap.spec.ts-snapshots/initiate-swap-darwin.png
Diff not rendered.
Binary file modified
BIN
-2.7 KB
(95%)
...ive-desktop/tests/specs/services/swap.spec.ts-snapshots/initiate-swap-linux.png
Oops, something went wrong.
Binary file modified
BIN
-911 Bytes
(98%)
...ive-desktop/tests/specs/services/swap.spec.ts-snapshots/initiate-swap-win32.png
Oops, something went wrong.
Binary file removed
BIN
-84 KB
...sktop/tests/specs/services/swap.spec.ts-snapshots/max-spendable-swap-darwin.png
Diff not rendered.
Binary file modified
BIN
+108 Bytes
(100%)
...esktop/tests/specs/services/swap.spec.ts-snapshots/max-spendable-swap-linux.png
Oops, something went wrong.
Binary file modified
BIN
+20 Bytes
(100%)
...esktop/tests/specs/services/swap.spec.ts-snapshots/max-spendable-swap-win32.png
Oops, something went wrong.
Binary file removed
BIN
-64.4 KB
...ktop/tests/specs/services/swap.spec.ts-snapshots/network-fees-drawer-darwin.png
Diff not rendered.
Binary file modified
BIN
-53 Bytes
(100%)
...sktop/tests/specs/services/swap.spec.ts-snapshots/network-fees-drawer-linux.png
Oops, something went wrong.
Binary file modified
BIN
-179 Bytes
(100%)
...sktop/tests/specs/services/swap.spec.ts-snapshots/network-fees-drawer-win32.png
Oops, something went wrong.
Binary file removed
BIN
-90.7 KB
.../services/swap.spec.ts-snapshots/only-decentralised-quotes-displayed-darwin.png
Diff not rendered.
Binary file modified
BIN
-72 Bytes
(100%)
...s/services/swap.spec.ts-snapshots/only-decentralised-quotes-displayed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-106 Bytes
(100%)
...s/services/swap.spec.ts-snapshots/only-decentralised-quotes-displayed-win32.png
Oops, something went wrong.
Binary file removed
BIN
-45 KB
...e-desktop/tests/specs/services/swap.spec.ts-snapshots/open-swap-page-darwin.png
Diff not rendered.
Binary file modified
BIN
-24 Bytes
(100%)
...ve-desktop/tests/specs/services/swap.spec.ts-snapshots/open-swap-page-linux.png
Oops, something went wrong.
Binary file modified
BIN
-14 Bytes
(100%)
...ve-desktop/tests/specs/services/swap.spec.ts-snapshots/open-swap-page-win32.png
Oops, something went wrong.
Binary file removed
BIN
-42.5 KB
...ices/swap.spec.ts-snapshots/open-swap-page-with-eth-account-selected-darwin.png
Diff not rendered.
Binary file modified
BIN
-23 Bytes
(100%)
...vices/swap.spec.ts-snapshots/open-swap-page-with-eth-account-selected-linux.png
Oops, something went wrong.
Binary file modified
BIN
-17 Bytes
(100%)
...vices/swap.spec.ts-snapshots/open-swap-page-with-eth-account-selected-win32.png
Oops, something went wrong.
Binary file removed
BIN
-56.9 KB
...ests/specs/services/swap.spec.ts-snapshots/standard-network-selected-darwin.png
Diff not rendered.
Binary file modified
BIN
+16 Bytes
(100%)
...tests/specs/services/swap.spec.ts-snapshots/standard-network-selected-linux.png
Oops, something went wrong.
Binary file modified
BIN
-260 Bytes
(100%)
...tests/specs/services/swap.spec.ts-snapshots/standard-network-selected-win32.png
Oops, something went wrong.
Binary file removed
BIN
-44.3 KB
...sktop/tests/specs/services/swap.spec.ts-snapshots/swap-pair-reversed-darwin.png
Diff not rendered.
Binary file modified
BIN
-20 Bytes
(100%)
...esktop/tests/specs/services/swap.spec.ts-snapshots/swap-pair-reversed-linux.png
Oops, something went wrong.
Binary file modified
BIN
+15 Bytes
(100%)
...esktop/tests/specs/services/swap.spec.ts-snapshots/swap-pair-reversed-win32.png
Oops, something went wrong.
Binary file removed
BIN
-16.9 KB
...op/tests/specs/services/swap.spec.ts-snapshots/target-account-drawer-darwin.png
Diff not rendered.
Binary file removed
BIN
-54.1 KB
...ktop/tests/specs/services/swap.spec.ts-snapshots/verify-swap-details-darwin.png
Diff not rendered.
Binary file removed
BIN
-51.2 KB
...sktop/tests/specs/services/swap.spec.ts-snapshots/verify-swap-details-linux.png
Diff not rendered.
Binary file removed
BIN
-54.2 KB
...sktop/tests/specs/services/swap.spec.ts-snapshots/verify-swap-details-win32.png
Diff not rendered.
Binary file removed
BIN
-56.4 KB
...ktop/tests/specs/services/swap.spec.ts-snapshots/verify-swap-history-darwin.png
Diff not rendered.
Binary file modified
BIN
-326 Bytes
(99%)
...sktop/tests/specs/services/swap.spec.ts-snapshots/verify-swap-history-linux.png
Oops, something went wrong.
Binary file modified
BIN
-252 Bytes
(100%)
...sktop/tests/specs/services/swap.spec.ts-snapshots/verify-swap-history-win32.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters