Merge branch 'master' into task/token-flow-tests
This commit is contained in:
commit
056edfe132
41
apps/token-e2e/src/integration/rewards.cy.js
Normal file
41
apps/token-e2e/src/integration/rewards.cy.js
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import navigation from '../locators/navigation.locators';
|
||||||
|
import rewards from '../locators/rewards.locators';
|
||||||
|
|
||||||
|
context('Rewards Page - verify elements on page', function () {
|
||||||
|
before('navigate to rewards page', function () {
|
||||||
|
cy.visit('/')
|
||||||
|
.get(navigation.section)
|
||||||
|
.within(() => {
|
||||||
|
cy.get(navigation.rewards).click();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('with wallets disconnected', function () {
|
||||||
|
it('should have REWARDS tab highlighted', function () {
|
||||||
|
cy.get(navigation.section).within(() => {
|
||||||
|
cy.get(navigation.rewards).should('have.attr', 'aria-current');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have rewards header visible', function () {
|
||||||
|
cy.get(rewards.pageHeader)
|
||||||
|
.should('be.visible')
|
||||||
|
.and('have.text', 'Rewards');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have epoch warning', function () {
|
||||||
|
cy.get(rewards.warning)
|
||||||
|
.should('be.visible')
|
||||||
|
.and(
|
||||||
|
'have.text',
|
||||||
|
'Rewards are credited 5 minutes after the epoch ends.This delay is set by a network parameter'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have connect Vega wallet button', function () {
|
||||||
|
cy.get(rewards.connectToVegaBtn)
|
||||||
|
.should('be.visible')
|
||||||
|
.and('have.text', 'Connect Vega wallet');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
6
apps/token-e2e/src/locators/rewards.locators.js
Normal file
6
apps/token-e2e/src/locators/rewards.locators.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import common from './common.locators';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
...common,
|
||||||
|
connectToVegaBtn: '[data-testid="connect-to-vega-wallet-btn"]',
|
||||||
|
};
|
@ -149,6 +149,7 @@ export const RewardsIndex = () => {
|
|||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
className="mt-12"
|
className="mt-12"
|
||||||
|
data-testid="connect-to-vega-wallet-btn"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
appDispatch({
|
appDispatch({
|
||||||
type: AppStateActionType.SET_VEGA_WALLET_OVERLAY,
|
type: AppStateActionType.SET_VEGA_WALLET_OVERLAY,
|
||||||
|
Loading…
Reference in New Issue
Block a user