Skip to content

Commit

Permalink
Merge branch 'main' into test-maintenance-6-may-2024-test-disable
Browse files Browse the repository at this point in the history
  • Loading branch information
emiride committed May 6, 2024
2 parents 632aea1 + dd13595 commit 2764e75
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Testing getAssetImageUrl function', () => {
const fortmatImgSrcSpyResult = 'fortmatImgSrcSpy';
const fortmatImgSrcSpy = jest.spyOn(getImages, 'fortmatImgSrc').mockReturnValueOnce(fortmatImgSrcSpyResult);

expect(getImages.getAssetImageUrl('ipfs://image')).toBe('https://ipfs.io/ipfs/image');
expect(getImages.getAssetImageUrl('ipfs://image')).toBe('https://ipfs.blockfrost.dev/ipfs/image');
expect(getImages.getAssetImageUrl('data:image/image')).toBe('data:image/image');
expect(getImages.getAssetImageUrl('image')).toBe(fortmatImgSrcSpyResult);
expect(fortmatImgSrcSpy).toBeCalledWith({ img: 'image', type: 'png' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const fortmatImgSrc = (params: { img: string; type: string }): string =>

export const getAssetImageUrl = (image: string): string => {
if (image.startsWith('ipfs')) {
return image.replace('ipfs://', 'https://ipfs.io/ipfs/');
return image.replace('ipfs://', 'https://ipfs.blockfrost.dev/ipfs/');
}

if (image.startsWith('data:image/')) return image;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ describe('Testing nftImageSelector', () => {
const imageUri = 'ipfs://nft-address' as unknown as Wallet.Asset.Uri;
const image = nftImageSelector(imageUri);

expect(image).toBe('https://ipfs.io/ipfs/nft-address');
expect(image).toBe('https://ipfs.blockfrost.dev/ipfs/nft-address');
});
});
2 changes: 1 addition & 1 deletion packages/e2e-tests/src/assert/adaHandleAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { browser } from '@wdio/globals';

class AdaHandleAssert {
public customHandleSrcValue = 'https://ipfs.io/ipfs/zdj7WX1C4V25M3YwFkj8ySLAnKR2eCQZ76pn96CNMc27Es2LP';
public customHandleSrcValue = 'https://ipfs.blockfrost.dev/ipfs/zdj7WX1C4V25M3YwFkj8ySLAnKR2eCQZ76pn96CNMc27Es2LP';

async assertSeeCustomImage(imageElement: WebdriverIO.Element) {
await imageElement.scrollIntoView();
Expand Down
4 changes: 0 additions & 4 deletions packages/e2e-tests/src/features/AdaHandleExtended.feature
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ Feature: ADA handle - extended view
And Clipboard contains text: "$test_handle_3"

@LW-7427 @LW-7426
@Pending @issue=LW-10444
Scenario: Extended View - Validate custom ADA handle image on the wallet address/NFTs/NFT details page
When I click "Receive" button on page header
Then I see ADA handle with custom image on the "Wallet Address" page
Expand All @@ -110,7 +109,6 @@ Feature: ADA handle - extended view
Then I see ADA handle NFT details page with custom image in extended mode

@LW-7430
@Pending @issue=LW-10444
Scenario: Extended View - Validate custom ADA handle image on the send/coin selector page
When I click "Send" button on page header
And I click "Add token or NFT" button for bundle 1
Expand All @@ -121,7 +119,6 @@ Feature: ADA handle - extended view
Then the "$test_handle_1" asset is displayed in bundle 1

@LW-7429
@Pending @issue=LW-10444
Scenario: Extended View - Validate custom ADA handle image on the NFT folder thumbnail/page
Given I navigate to NFTs extended page
And I click "Receive" button on page header
Expand All @@ -139,7 +136,6 @@ Feature: ADA handle - extended view
Then I see ADA handle NFT with custom image on the NFT folder page

@LW-7428
@Pending @issue=LW-10444
Scenario: Extended View - Validate custom ADA handle image on the "Select NFT" (folder) screen
Given I navigate to NFTs extended page
And I click "Receive" button on page header
Expand Down
4 changes: 0 additions & 4 deletions packages/e2e-tests/src/features/AdaHandlePopup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Feature: ADA handle - popup view
And Clipboard contains text: "$test_handle_3"

@LW-7435 @LW-7436
@Pending @issue=LW-10444
Scenario: Popup View - Validate custom ADA handle image on the wallet address/NFTs/NFT details page
And I click "Receive" button on Tokens page in popup mode
Then I see ADA handle with custom image on the "Wallet Address" page
Expand All @@ -109,7 +108,6 @@ Feature: ADA handle - popup view
Then I see ADA handle NFT details page with custom image in popup mode

@LW-7432
@Pending @issue=LW-10444
Scenario: Popup View - Validate custom ADA handle image on the send/coin selector page
When I click "Send" button on Tokens page in popup mode
And I click "Add token or NFT" button for bundle 1
Expand All @@ -120,7 +118,6 @@ Feature: ADA handle - popup view
Then the "$test_hand..." asset is displayed in bundle 1

@LW-7434
@Pending @issue=LW-10444
Scenario: Popup View - Validate custom ADA handle image on the NFT folder thumbnail/page
Given I click "Receive" button on Tokens page in popup mode
And I see handles listed on the "Receive" screen
Expand All @@ -137,7 +134,6 @@ Feature: ADA handle - popup view
Then I see ADA handle NFT with custom image on the NFT folder page

@LW-7433
@Pending @issue=LW-10444
Scenario: Popup View - Validate custom image from a handle on the "Select NFT" (folder) screen
Given I click "Receive" button on Tokens page in popup mode
And I see handles listed on the "Receive" screen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const TransactionAssets = ({
if (value === '' || value === undefined) {
return themeFallbackImage;
} else if (value.startsWith('ipfs')) {
return value.replace('ipfs://', 'https://ipfs.io/ipfs/');
return value.replace('ipfs://', 'https://ipfs.blockfrost.dev/ipfs/');
} else if (isImageBase64Encoded(value)) {
return `data:image/png;base64,${value}`;
} else {
Expand Down

0 comments on commit 2764e75

Please sign in to comment.