1
- import { landingPageNetwork , landingPageUrl } from '../fixtures/landingData'
1
+ import { landingPageNetwork } from '../fixtures/landingData'
2
2
import { setIdentityMultisigs } from '../fixtures/setIdentity/setIdentityMultisigs'
3
3
import { setIdentitySignatories } from '../fixtures/setIdentity/setIdentitySignatories'
4
4
import { multisigPage } from '../support/page-objects/multisigPage'
5
5
import { sendTxModal } from '../support/page-objects/sendTxModal'
6
6
import { topMenuItems } from '../support/page-objects/topMenuItems'
7
- import { waitForTxRequest } from '../utils/waitForTxRequests'
7
+ // import { waitForTxRequest } from '../utils/waitForTxRequests'
8
8
9
9
describe ( 'Set an identity' , ( ) => {
10
10
// joystream network isn't supported any more.
@@ -25,69 +25,69 @@ describe('Set an identity', () => {
25
25
sendTxModal . selectionEasySetupSetIdentity ( ) . should ( 'not.exist' )
26
26
} )
27
27
28
- it . skip ( 'Can set an identity from the options menu' , ( ) => {
29
- const multisigSignatoryWithoutIdentity = setIdentitySignatories [ 1 ]
30
- cy . setupAndVisit ( {
31
- url : landingPageUrl ,
32
- extensionConnectionAllowed : true ,
33
- injectExtensionWithAccounts : [ multisigSignatoryWithoutIdentity ]
34
- } )
35
- multisigPage . optionsMenuButton ( ) . click ( )
36
- multisigPage . setIdentityMenuOption ( ) . should ( 'be.visible' ) . click ( )
37
- sendTxModal . sendTxTitle ( ) . should ( 'be.visible' )
38
- sendTxModal . setIdentitySection ( ) . should ( 'be.visible' )
28
+ // it.skip('Can set an identity from the options menu', () => {
29
+ // const multisigSignatoryWithoutIdentity = setIdentitySignatories[1]
30
+ // cy.setupAndVisit({
31
+ // url: landingPageUrl,
32
+ // extensionConnectionAllowed: true,
33
+ // injectExtensionWithAccounts: [multisigSignatoryWithoutIdentity]
34
+ // })
35
+ // multisigPage.optionsMenuButton().click()
36
+ // multisigPage.setIdentityMenuOption().should('be.visible').click()
37
+ // sendTxModal.sendTxTitle().should('be.visible')
38
+ // sendTxModal.setIdentitySection().should('be.visible')
39
39
40
- // every field is empty to start with
41
- sendTxModal . setIdentityFieldInput ( 'display' ) . should ( 'have.value' , '' )
42
- sendTxModal . setIdentityFieldInput ( 'legal' ) . should ( 'have.value' , '' )
40
+ // // every field is empty to start with
41
+ // sendTxModal.setIdentityFieldInput('display').should('have.value', '')
42
+ // sendTxModal.setIdentityFieldInput('legal').should('have.value', '')
43
43
44
- // typing into legal with empty display should show an error
45
- sendTxModal . setIdentityField ( 'legal' ) . type ( 'le' )
46
- sendTxModal . sendTxError ( ) . should ( 'contain' , 'Display name is required' )
47
- sendTxModal . setIdentityFieldElement ( 'display' , 'label' ) . should ( 'have.class' , 'Mui-error' )
48
- sendTxModal . setIdentityFieldElement ( 'display' , 'div' ) . should ( 'have.class' , 'Mui-error' )
49
- sendTxModal . buttonSend ( ) . should ( 'be.disabled' )
44
+ // // typing into legal with empty display should show an error
45
+ // sendTxModal.setIdentityField('legal').type('le')
46
+ // sendTxModal.sendTxError().should('contain', 'Display name is required')
47
+ // sendTxModal.setIdentityFieldElement('display', 'label').should('have.class', 'Mui-error')
48
+ // sendTxModal.setIdentityFieldElement('display', 'div').should('have.class', 'Mui-error')
49
+ // sendTxModal.buttonSend().should('be.disabled')
50
50
51
- // typing into display should remove the error
52
- sendTxModal . setIdentityField ( 'display' ) . type ( 'diis' )
53
- sendTxModal . sendTxError ( ) . should ( 'not.exist' )
54
- sendTxModal . setIdentityFieldElement ( 'display' , 'label' ) . should ( 'not.have.class' , 'Mui-error' )
55
- sendTxModal . buttonSend ( ) . should ( 'be.enabled' )
51
+ // // typing into display should remove the error
52
+ // sendTxModal.setIdentityField('display').type('diis')
53
+ // sendTxModal.sendTxError().should('not.exist')
54
+ // sendTxModal.setIdentityFieldElement('display', 'label').should('not.have.class', 'Mui-error')
55
+ // sendTxModal.buttonSend().should('be.enabled')
56
56
57
- // typing a too long field should show another error
58
- sendTxModal . setIdentityField ( 'legal' ) . type ( 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' )
59
- sendTxModal . sendTxError ( ) . should ( 'contain' , 'A field exceeds the 32 character limit' )
60
- sendTxModal . setIdentityFieldElement ( 'legal' , 'label' ) . should ( 'have.class' , 'Mui-error' )
61
- sendTxModal . buttonSend ( ) . should ( 'be.disabled' )
57
+ // // typing a too long field should show another error
58
+ // sendTxModal.setIdentityField('legal').type('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
59
+ // sendTxModal.sendTxError().should('contain', 'A field exceeds the 32 character limit')
60
+ // sendTxModal.setIdentityFieldElement('legal', 'label').should('have.class', 'Mui-error')
61
+ // sendTxModal.buttonSend().should('be.disabled')
62
62
63
- // too many bytes should show the From error
64
- sendTxModal . setIdentityField ( 'legal' ) . type ( '{selectall}{del}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' )
65
- sendTxModal . setIdentityFieldElement ( 'legal' , 'label' ) . should ( 'not.have.class' , 'Mui-error' )
66
- sendTxModal . sendTxError ( ) . should ( 'contain' , `The "From" account doesn't have` )
67
- sendTxModal . buttonSend ( ) . should ( 'be.disabled' )
63
+ // // too many bytes should show the From error
64
+ // sendTxModal.setIdentityField('legal').type('{selectall}{del}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
65
+ // sendTxModal.setIdentityFieldElement('legal', 'label').should('not.have.class', 'Mui-error')
66
+ // sendTxModal.sendTxError().should('contain', `The "From" account doesn't have`)
67
+ // sendTxModal.buttonSend().should('be.disabled')
68
68
69
- // removing should remove the error
70
- sendTxModal . setIdentityField ( 'legal' ) . type ( '{selectall}{del}leeg' )
71
- sendTxModal . sendTxError ( ) . should ( 'not.exist' )
72
- sendTxModal . setIdentityFieldElement ( 'legal' , 'label' ) . should ( 'not.have.class' , 'Mui-error' )
73
- sendTxModal . buttonSend ( ) . should ( 'be.enabled' )
69
+ // // removing should remove the error
70
+ // sendTxModal.setIdentityField('legal').type('{selectall}{del}leeg')
71
+ // sendTxModal.sendTxError().should('not.exist')
72
+ // sendTxModal.setIdentityFieldElement('legal', 'label').should('not.have.class', 'Mui-error')
73
+ // sendTxModal.buttonSend().should('be.enabled')
74
74
75
- // verify the tx it sends
76
- sendTxModal . buttonSend ( ) . click ( )
77
- waitForTxRequest ( )
78
- cy . getTxRequests ( ) . then ( ( req ) => {
79
- const txRequests = Object . values ( req )
80
- cy . wrap ( txRequests . length ) . should ( 'eq' , 1 )
81
- cy . wrap ( txRequests [ 0 ] . payload . address ) . should ( 'eq' , multisigSignatoryWithoutIdentity . address )
82
- sendTxModal . buttonSend ( ) . should ( 'not.exist' )
83
- sendTxModal . buttonSending ( ) . should ( 'be.visible' )
84
- // expected https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/extrinsics/decode/0x1f0102000412ad770206045069201514711dc2456908b0af226442d475d12a5334e9c4513e001901000564696973056c6565670000000000000000
85
- cy . wrap ( txRequests [ 0 ] . payload ) . should (
86
- 'eq' ,
87
- '0x1f0102000412ad770206045069201514711dc2456908b0af226442d475d12a5334e9c4513e001901000564696973056c6565670000000000000000'
88
- )
89
- } )
90
- } )
75
+ // // verify the tx it sends
76
+ // sendTxModal.buttonSend().click()
77
+ // waitForTxRequest()
78
+ // cy.getTxRequests().then((req) => {
79
+ // const txRequests = Object.values(req)
80
+ // cy.wrap(txRequests.length).should('eq', 1)
81
+ // cy.wrap(txRequests[0].payload.address).should('eq', multisigSignatoryWithoutIdentity.address)
82
+ // sendTxModal.buttonSend().should('not.exist')
83
+ // sendTxModal.buttonSending().should('be.visible')
84
+ // // expected https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/extrinsics/decode/0x1f0102000412ad770206045069201514711dc2456908b0af226442d475d12a5334e9c4513e001901000564696973056c6565670000000000000000
85
+ // cy.wrap(txRequests[0].payload.method ).should(
86
+ // 'eq',
87
+ // '0x1f0102000412ad770206045069201514711dc2456908b0af226442d475d12a5334e9c4513e001901000564696973056c6565670000000000000000'
88
+ // )
89
+ // })
90
+ // })
91
91
92
92
// skipping since identity now needs to be handled with the associatedppl chain
93
93
it . skip ( 'Can edit an identity from the new tx button' , ( ) => {
0 commit comments