Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into pwa-header
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Jan 7, 2025
2 parents 7a37791 + 5bcc4c7 commit 0d91a02
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
12 changes: 12 additions & 0 deletions apps/web/cypress/e2e/pages/main.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const acceptSelection = 'Save settings'
const executeStr = 'Execute'
const connectedOwnerBlock = '[data-testid="open-account-center"]'
export const modalDialogCloseBtn = '[data-testid="modal-dialog-close-btn"]'
const closeOutreachPopupBtn = 'button[aria-label="close outreach popup"]'

export const noRelayAttemptsError = 'Not enough relay attempts remaining'

export function checkElementBackgroundColor(element, color) {
Expand Down Expand Up @@ -204,6 +206,16 @@ export function acceptCookies2() {
})
}

export function closeOutreachPopup() {
cy.wait(1000)
cy.get('body').then(($body) => {
if ($body.find(closeOutreachPopupBtn).length > 0) {
cy.get(closeOutreachPopupBtn).click()
cy.wait(500)
}
})
}

export function verifyOwnerConnected(prefix = 'sep:') {
cy.get(connectedOwnerBlock).should('contain', prefix)
}
Expand Down
8 changes: 6 additions & 2 deletions apps/web/cypress/support/utils/wallet.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import * as main from '../../e2e/pages/main.page'

const onboardv2 = 'onboard-v2'
const pkInput = '[data-testid="private-key-input"]'
const pkConnectBtn = '[data-testid="pk-connect-btn"]'
Expand Down Expand Up @@ -42,7 +44,7 @@ export function connectSigner(signer) {

function enterPrivateKey() {
cy.wait(3000)
cy.get('body').then(($body) => {
return cy.get('body').then(($body) => {
if ($body.find(pkInput).length > 0) {
cy.get(pkInput)
.find('input')
Expand All @@ -65,5 +67,7 @@ export function connectSigner(signer) {
})
}

enterPrivateKey()
enterPrivateKey().then(() => {
main.closeOutreachPopup()
})
}
2 changes: 1 addition & 1 deletion apps/web/src/components/common/TokenIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const TokenIcon = ({
}): ReactElement => {
const src = useMemo(() => {
return logoUri?.replace(COINGECKO_THUMB, COINGECKO_SMALL)
}, [])
}, [logoUri])

return (
<ImageFallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const SignerForm = ({ willExecute }: { willExecute?: boolean }) => {
>
{options?.map((owner) => (
<MenuItem key={owner} value={owner} disabled={!isOptionEnabled(owner)}>
<EthHashInfo address={owner} avatarSize={32} onlyName />
<EthHashInfo address={owner} avatarSize={32} onlyName copyAddress={false} />
{!isOptionEnabled(owner) && (
<Typography variant="caption" component="span" className={css.disabledPill}>
Already signed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const OutreachPopup = (): ReactElement | null => {
</Typography>
</Stack>
<Track {...OUTREACH_EVENTS.CLOSE_POPUP}>
<IconButton className={css.close} aria-label="close" onClick={handleClose}>
<IconButton className={css.close} aria-label="close outreach popup" onClick={handleClose}>
<Close />
</IconButton>
</Track>
Expand Down

0 comments on commit 0d91a02

Please sign in to comment.