2022-06-14 19:27:34 +05:30
|
|
|
describe('Test plugins', () => {
|
|
|
|
|
before(() => {
|
|
|
|
|
Cypress.config('includeShadowDom', true)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// Keeps the session cookie alive, Cypress by default clears all cookies before each test
|
|
|
|
|
beforeEach(() => {
|
2022-02-25 16:38:41 +01:00
|
|
|
cy.viewport(1200,660)
|
|
|
|
|
cy.visit('/')
|
2022-06-14 19:27:34 +05:30
|
|
|
})
|
|
|
|
|
|
|
|
|
|
it('Associate an address with a service', () => {
|
2022-02-25 16:38:41 +01:00
|
|
|
// choose address
|
2022-07-19 13:19:32 +05:30
|
|
|
cy.selectWallet("Ghost wallet")
|
2022-06-14 19:27:34 +05:30
|
|
|
cy.get('main').contains('Addresses').click()
|
|
|
|
|
// Click on the first address
|
|
|
|
|
cy.contains('td', '#0').siblings().contains('bcrt').click()
|
|
|
|
|
cy.get('#associate-btn').click()
|
2022-02-25 16:38:41 +01:00
|
|
|
cy.contains("Service integration requires an authentication method that includes a password")
|
2022-06-14 19:27:34 +05:30
|
|
|
// OK, let's set a password
|
2022-02-25 16:38:41 +01:00
|
|
|
cy.get('select').select("passwordonly")
|
|
|
|
|
cy.get('#specter_password_only').type("mySecretPassword")
|
|
|
|
|
cy.get('#submit-btn').click()
|
|
|
|
|
cy.contains("Admin password successfully updated")
|
|
|
|
|
|
2022-06-14 19:27:34 +05:30
|
|
|
// Choose address again
|
2022-07-19 13:19:32 +05:30
|
|
|
cy.selectWallet("Ghost wallet")
|
2022-06-14 19:27:34 +05:30
|
|
|
cy.get('main').contains('Addresses').click()
|
|
|
|
|
cy.contains('td', '#0').siblings().contains('bcrt').click()
|
|
|
|
|
cy.get('#associate-btn').click()
|
2022-02-25 16:38:41 +01:00
|
|
|
cy.contains("Associating an address with a service will")
|
|
|
|
|
})
|
|
|
|
|
|
2022-06-14 19:27:34 +05:30
|
|
|
it('Deactivate password protection', () => {
|
|
|
|
|
// This flow only works if we don't keep the session alive! So, no Cypress.Cookies.preserveOnce('session') in beforeEach().
|
2022-02-25 16:38:41 +01:00
|
|
|
cy.get('#password').type("mySecretPassword")
|
|
|
|
|
cy.get('#login-btn').click()
|
|
|
|
|
cy.get('[href="/settings/"] > .svg-white').click()
|
|
|
|
|
cy.get('[href="/settings/auth"]').click()
|
|
|
|
|
cy.get('select').select("none")
|
|
|
|
|
cy.get('#submit-btn').click()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
})
|