Skip to content

Commit

Permalink
feat: improve e2e testing - charts (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
janmichek authored Oct 30, 2024
1 parent cbfbf1d commit 4bed5cf
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 4 deletions.
27 changes: 27 additions & 0 deletions cypress/e2e/app/charts.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
describe('charts', () => {
it('should display transactions chart UI elements', () => {
cy.visit('/charts/transactions')
cy.get('.charts-navigation__link').should('be.visible')
cy.get('.chart-controls__button').should('be.visible')
cy.get('.range-picker').should('be.visible')
cy.get('.transactions-chart-panel__select').should('be.visible')
cy.get('.line-chart canvas').should('be.visible')
cy.get('.chart-controls__button').should('be.visible')
})
it('should display keyblock chart', () => {
cy.visit('/charts/keyblocks')
cy.get('.line-chart canvas').should('be.visible')
})
it('should display contracts chart', () => {
cy.visit('/charts/contracts')
cy.get('.line-chart canvas').should('be.visible')
})
it('should display names chart', () => {
cy.visit('/charts/names')
cy.get('.line-chart canvas').should('be.visible')
})
it('should display difficulty', () => {
cy.visit('/charts/difficulty')
cy.get('.line-chart canvas').should('be.visible')
})
})
11 changes: 11 additions & 0 deletions cypress/e2e/app/contractVerification.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
describe('contract verification', () => {
it('should display contract verification page', () => {
cy.visit('/contract-verification')

cy.get('.contract-verification-form__select').should('be.visible')
cy.get('.contract-verification-form__text-input').should('be.visible')
cy.get('.contract-verification-form__submit').should('be.visible')
cy.get('.contracts-file-upload__drop-area').should('be.visible')
cy.get('#consent').should('be.visible')
})
})
3 changes: 2 additions & 1 deletion src/components/ContractVerificationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
</div>

<div class="contract-verification-form__field">
<label for="compiler">
<label for="license">
License
<hint-tooltip>
{{ contractVerificationHints.required }}
</hint-tooltip>
</label>
<license-select
id="license"
v-model="form.license"
class="contract-verification-form__select"/>
<p
Expand Down
2 changes: 1 addition & 1 deletion src/components/DifficultyChartPanel.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<app-panel>
<template #title>
DIFFICULTY CHART
DIFFICULTY
</template>
<template #end>
<chart-controls
Expand Down
2 changes: 1 addition & 1 deletion src/components/NamesChartPanel.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<app-panel>
<template #title>
NAMES ACTIVATED TREND
NAMES ACTIVATED
</template>
<template #end>
<chart-controls
Expand Down
3 changes: 2 additions & 1 deletion src/components/TransactionsChartPanel.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<template>
<app-panel>
<template #title>
TRANSACTIONS TREND
TRANSACTIONS
</template>
<template #end>
<transactions-select
v-if="hasSelect"
v-model="selectedTxType"
size="sm"
data-cy='select-input'
class="transactions-chart-panel__select
transactions-chart-panel__select--desktop
u-hidden-mobile"/>
Expand Down

0 comments on commit 4bed5cf

Please sign in to comment.