Skip to content

Commit

Permalink
Revert "Add e2e tests for the sign multisignature transaction screen -
Browse files Browse the repository at this point in the history
…Closes #4102 (#4144)"

This reverts commit 67dbc5f.
  • Loading branch information
gadjacobs committed Feb 21, 2022
1 parent fdeebd2 commit c00a8b5
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 295 deletions.
5 changes: 2 additions & 3 deletions src/components/screens/multiSignature/form/memberField.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ const MemberField = ({
<div className={styles.memberFieldContainer}>
<InputWithDropdown
t={t}
className={`${styles.inputWithDropdown} msign-pk-input`}
className={styles.inputWithDropdown}
value={publicKey}
onChange={changeIdentifier}
placeholder={t('Account public key')}
ButtonComponent={SecondaryButton}
buttonLabel={isMandatory ? t('Mandatory') : t('Optional')}
buttonClassName="mandatory-toggle"
>
<span className="select-optional" onClick={() => changeCategory(false)}>
<span onClick={() => changeCategory(false)}>
{t('Optional')}
</span>
<span onClick={() => changeCategory(true)}>
Expand Down
3 changes: 1 addition & 2 deletions src/components/screens/signMultiSignTransaction/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ const Form = ({ t, nextStep, network }) => {
<div className={`${styles.textAreaContainer} ${error && styles.error} ${transaction && styles.filled}`}>
<textarea
onPaste={onPaste}
onChange={onPaste}
value={transaction ? JSON.stringify(transaction) : ''}
readOnly
className={`${styles.txInput} tx-sign-input`}
className={styles.txInput}
/>
<Feedback
message={error}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const RequiredSignatures = ({ t }) => {

return (
<ValueAndLabel className={styles.requiredSignatures} label={t('Required signatures')}>
<span className="tx-required-signatures">{requiredSignatures}</span>
<span>{requiredSignatures}</span>
</ValueAndLabel>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const MultiSignatureButton = ({
component={component}
>
<Tooltip
className={`${styles.tooltipWrapper} ${styles.centerContent} ${isMultisignature ? styles.whiteBackground : ''} account-info-msign`}
className={`${styles.tooltipWrapper} ${styles.centerContent} ${isMultisignature ? styles.whiteBackground : ''}`}
position="bottom"
size="maxContent"
content={(
Expand Down
4 changes: 2 additions & 2 deletions src/components/shared/multisignatureMembers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Member = ({ member, i, t }) => (
{i !== undefined && <p className={styles.memberInfoIndex}>{`${i + 1}.`}</p>}
<AccountVisual address={member.address} />
<div className={styles.memberDetails}>
<p className={`${styles.memberTitle} member-title`}>
<p className={styles.memberTitle}>
{member.name || truncateAddress(member.address)}
<span>{`(${member.mandatory ? t('Mandatory') : t('Optional')})`}</span>
</p>
Expand Down Expand Up @@ -50,7 +50,7 @@ export const SignedAndRemainingMembers = ({
<div>
<p className={styles.label}>
<span>{t('Remaining')}</span>
<span className="tx-remaining-members">{` ${needed}/${required}`}</span>
<span>{` ${needed}/${required}`}</span>
</p>
{remaining.map((member, i) =>
<Member member={member} key={`registerMultiSignature-members-list-${i}-remaining`} t={t} />)}
Expand Down
1 change: 0 additions & 1 deletion src/components/shared/transactionSummary/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const SecondPassInput = ({
<div className={styles.secondaryActions}>
<span className={styles.or}>or</span>
<TertiaryButton
className="use-second-passphrase-btn"
onClick={() => setInputStatus('visible')}
>
{t('Send using second passphrase right away')}
Expand Down
4 changes: 2 additions & 2 deletions src/components/shared/transactionsTable/transactionRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ const TransactionRow = ({
component="transactionDetails"
data={{ transactionId: data.id, token: tokenMap.LSK.key }}
>
<span className={`${grid['col-xs-3']} transaction-row-sender`}>
<span className={grid['col-xs-3']}>
<AccountVisualWithAddress
address={data.sender.address}
transactionSubject="sender"
moduleAssetId={data.moduleAssetId}
showBookmarkedAddress
/>
</span>
<span className={`${grid['col-xs-3']} transaction-row-recipient`}>
<span className={grid['col-xs-3']}>
<AccountVisualWithAddress
address={data.asset.recipient?.address}
transactionSubject="recipient"
Expand Down
4 changes: 2 additions & 2 deletions src/components/toolbox/inputs/inputWithDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import DropdownButton from '../dropdownButton';
import styles from './input.css';

const InputWithDropdown = ({
className, value, onChange, children, buttonLabel, buttonClassName, ButtonComponent, placeholder,
className, value, onChange, children, buttonLabel, ButtonComponent, placeholder,
}) => (
<div className={`${styles.inputWithDropdown} ${className} input-with-dropdown-container`}>
<Input
Expand All @@ -18,7 +18,7 @@ const InputWithDropdown = ({
/>
<DropdownButton
className="input-with-dropdown-dropdown"
buttonClassName={`${styles.inputDropdownButton} ${buttonClassName}`}
buttonClassName={styles.inputDropdownButton}
buttonLabel={buttonLabel}
size="s"
ButtonComponent={ButtonComponent}
Expand Down
9 changes: 4 additions & 5 deletions test/constants/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const accounts = {
multiSig_candidate: {
passphrase: 'approve tribe main deposit luxury obtain knock problem pulse claw social select',
summary: {
publicKey: 'a04a60f5f3f9be3a15b121342ba81b7bd66d37e7f3e8cc4f7c03396bd9c1f103',
serverPublicKey: 'a04a60f5f3f9be3a15b121342ba81b7bd66d37e7f3e8cc4f7c03396bd9c1f103',
publicKey: '35c6b25520fc868b56c83fed6e1c89bb350fb7994a5da0bcea7a4f621f948c7f',
serverPublicKey: '35c6b25520fc868b56c83fed6e1c89bb350fb7994a5da0bcea7a4f621f948c7f',
address: 'lsks6wh4zqfd8wyka3rj243rshcdqyug9gyvehxwz',
},
token: {},
Expand All @@ -92,8 +92,8 @@ const accounts = {
multiSig: {
passphrase: 'approve tribe main deposit luxury obtain knock problem pulse claw social select',
summary: {
publicKey: 'a04a60f5f3f9be3a15b121342ba81b7bd66d37e7f3e8cc4f7c03396bd9c1f103',
serverPublicKey: 'a04a60f5f3f9be3a15b121342ba81b7bd66d37e7f3e8cc4f7c03396bd9c1f103',
publicKey: '35c6b25520fc868b56c83fed6e1c89bb350fb7994a5da0bcea7a4f621f948c7f',
serverPublicKey: '35c6b25520fc868b56c83fed6e1c89bb350fb7994a5da0bcea7a4f621f948c7f',
address: 'lsks6wh4zqfd8wyka3rj243rshcdqyug9gyvehxwz',
balance: '9897000000000000',
isMigrated: true,
Expand Down Expand Up @@ -225,7 +225,6 @@ const accounts = {
dpos: { delegate: {} },
},
account2P: {
passphrase: 'steak avoid couple fog ability chalk jacket electric rifle fuel tuition van',
summary: {
address: 'lskwunwxqmss9w3mtuvzgbsfy665cz4eo3rd2mxdp',
balance: '5834556000',
Expand Down
22 changes: 1 addition & 21 deletions test/constants/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const ss = {
txAddedVotes: '.tx-added-votes .voter-address',
txRemovedVotes: '.tx-removed-votes .voter-address',
txAmount: '.tx-amount',
txFee: '.tx-fee',
txFee: '.tx-fee span',
txConfirmations: '.tx-confirmation',
txId: '.tx-id .copy-title',
txReference: '.tx-reference',
Expand Down Expand Up @@ -243,32 +243,12 @@ const ss = {
backToWalletButton: '.back-to-wallet-button',
accountsRow: '.accounts-row',
showMoreAccountsBtn: '.accounts-box .load-more',
signMultiSignTransactionToggle: '.signMultiSignTransaction-toggle',
accountInfoMsign: '.account-info-msign',
msignPkInput: '.msign-pk-input',
addNewMembers: '.add-new-members',
mandatoryToggle: '.mandatory-toggle',
selectOptional: '.select-optional',
multisignatureEditorInput: '.multisignature-editor-input',
copyButton: '.copy-button',
downloadButton: '.download-button',
signBtn: '.sign',
msignSendButton: '.send-button',
txSignInput: '.tx-sign-input',
txRequiredSignatures: '.tx-required-signatures',
memberTitle: '.member-title',
txRemainingMembers: '.tx-remaining-members',
useSecondPassphraseBtn: '.use-second-passphrase-btn',
peerRow: '.peer-row',
showMorePeersBtn: '.peers-box .load-more',
sortByBtn: '.sort-by',
signMessageInput: '.sign-message-input',
copyToClipboardBtn: '.copy-to-clipboard',
signedResult: '.result',
summary: '.summary',
transactionRowSender: '.transaction-row-sender',
transactionRowRecipient: '.transaction-row-recipient',
loadLatest: '.load-latest',
verifyMessageTextArea: '.verify-message-input',
continueBtn: '.continue',
inputsViewBtn: '.inputs-view-icon',
Expand Down
17 changes: 2 additions & 15 deletions test/cypress/features/common/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ Given(/^I am on (.*?) page of (.*?)$/, function (page, identifier) {
}
});

Given(/^I scroll from (.*?) to (.*?)$/, (elementName, position) => {
cy.get(ss[elementName]).scrollTo(position, { ensureScrollable: false });
Given(/^I scroll to (.*?)$/, (position) => {
cy.get('.scrollContainer').scrollTo(position, { ensureScrollable: false });
});

Then(/^I should see pending transaction$/, function () {
Expand Down Expand Up @@ -147,21 +147,12 @@ Then(/^The latest transaction is (.*?)$/, function (transactionType) {
case 'register delegate':
cy.get(`${ss.transactionRow} ${ss.transactionAddress}`).eq(0).contains('Register delegate');
break;
case 'register multisignature group':
cy.get(`${ss.transactionRow} ${ss.transactionAddress}`).eq(0).contains('Register multisig. group');
break;
case 'vote':
cy.get(`${ss.transactionRow} ${ss.transactionAddress}`).eq(0).contains('Vote');
break;
}
});

Then(/^The latest transaction in monitor is sent by (.*?) and recipient is (.*?)$/, function (sender, recipient) {
cy.wait(1000);
cy.get(`${ss.transactionRowSender}`).eq(0).contains(sender);
cy.get(`${ss.transactionRowRecipient}`).eq(0).contains(recipient);
});

Then(/^I should be on (.*?) page$/, function (pageName) {
switch (pageName.toLowerCase()) {
case 'tx details':
Expand All @@ -181,10 +172,6 @@ Then(/^I should see (.*?)$/, function (elementName) {
cy.get(ss[elementName]).should('be.visible');
});

Then(/^(.*?) should not exist$/, function (elementName) {
cy.get(ss[elementName]).should('not.exist');
});

Then(/^I should be on (.*?) page of (.*?)$/, function (pageName, identifier) {
switch (pageName.toLowerCase()) {
case 'account':
Expand Down
121 changes: 0 additions & 121 deletions test/cypress/features/multiSignTx.feature

This file was deleted.

Loading

0 comments on commit c00a8b5

Please sign in to comment.