Skip to content

Commit

Permalink
Fix post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibautBremand committed Oct 23, 2023
1 parent f4b57e9 commit ce31639
Show file tree
Hide file tree
Showing 8 changed files with 255 additions and 316 deletions.
18 changes: 10 additions & 8 deletions packages/extension/cypress/e2e/set_regular_key.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ describe('Set Regular Key', () => {

cy.get('h1[data-testid="page-title"]').should('have.text', 'Set Regular Key');

cy.contains('Regular Key:').next().should('have.text', 'rNvFCZXpDtGeQ3bVas95wGLN6N2stGmA9o');
cy.contains('Memos:').next().should('have.text', 'Test memo');
cy.contains('p', 'Regular Key')
.next()
.should('have.text', 'rNvFCZXpDtGeQ3bVas95wGLN6N2stGmA9o');
cy.contains('Memo').next().should('have.text', 'Test memo');

// Confirm
cy.contains('button', 'Confirm').click();
cy.contains('button', 'Submit').click();

cy.get('h1[data-testid="transaction-title"]').should('have.text', 'Transaction in progress');
cy.get('p[data-testid="transaction-subtitle"]').should(
Expand Down Expand Up @@ -82,15 +84,15 @@ describe('Set Regular Key', () => {
cy.get('input[name="regularKey"]').type('fake');
cy.get('input[name="regularKey"]').blur();
cy.get('#regularKey-helper-text').should('have.text', 'The regular key is not a valid address');
cy.contains('button', 'Confirm').should('be.disabled');
cy.contains('button', 'Submit').should('be.disabled');

// Enter Regular Key
cy.get('input[name="regularKey"]').clear();
cy.get('input[name="regularKey"]').type('rNvFCZXpDtGeQ3bVas95wGLN6N2stGmA9o');
cy.contains('button', 'Confirm').should('be.enabled');
cy.contains('button', 'Submit').should('be.enabled');

// Confirm
cy.contains('button', 'Confirm').click();
cy.contains('button', 'Submit').click();

cy.get('h1[data-testid="transaction-title"]').should('have.text', 'Transaction in progress');
cy.get('p[data-testid="transaction-subtitle"]').should(
Expand Down Expand Up @@ -118,10 +120,10 @@ describe('Set Regular Key', () => {

// Check the checkbox
cy.get('input[name="deleteRegularKey"]').click();
cy.contains('button', 'Confirm').should('be.enabled');
cy.contains('button', 'Submit').should('be.enabled');

// Confirm
cy.contains('button', 'Confirm').click();
cy.contains('button', 'Submit').click();

cy.get('h1[data-testid="transaction-title"]').should('have.text', 'Transaction in progress');
cy.get('p[data-testid="transaction-subtitle"]').should(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface ActionButtonsProps {
headerText?: string;
isApproveEnabled?: boolean;
approveButtonText?: string;
rejectButtonText?: string;
navigation?: NavigationProps;
}

Expand All @@ -31,6 +32,7 @@ export const ActionButtons: FC<ActionButtonsProps> = ({
headerText,
isApproveEnabled = true,
approveButtonText = 'Sign',
rejectButtonText = 'Reject',
navigation
}) => {
const buttonStyle = {
Expand Down Expand Up @@ -73,7 +75,7 @@ export const ActionButtons: FC<ActionButtonsProps> = ({
onClick={onClickReject}
style={buttonStyle}
>
Reject
{rejectButtonText}
</Button>
</Grid>
{navigation?.isNavigationEnabled ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export const XRPLTransaction: FC<XRPLTxProps> = ({
OfferSequence: (value?: number) =>
renderSimpleText({ title: 'Offer Sequence', value, useLegacy }),
EmailHash: (value?: string) => renderSimpleText({ title: 'Email Hash', value, useLegacy }),
NFTokenTaxon: (value?: string) => renderSimpleText({ title: 'Taxon', value, useLegacy })
NFTokenTaxon: (value?: string) => renderSimpleText({ title: 'Taxon', value, useLegacy }),
RegularKey: (value?: string) => renderSimpleText({ title: 'Regular Key', value, useLegacy })
};

const renderSimpleText = (params: {
Expand Down
Loading

0 comments on commit ce31639

Please sign in to comment.