Skip to content

Commit

Permalink
oct-2144: calendar alert test 7
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikolajczyk committed Nov 26, 2024
1 parent 52070e4 commit bd860f7
Show file tree
Hide file tree
Showing 9 changed files with 1,145 additions and 1,145 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
vault-confirm-withdrawals-enabled: true
glm-claim-enabled: true
anvil-block-time: 5
decision-window: 1209600
epoch-duration: 7776000
decision-window: 1800
epoch-duration: 3600
ipfs-gateways: 'https://ipfs.octant.wildland.dev/ipfs/'
secrets: inherit

Expand Down
486 changes: 243 additions & 243 deletions client/cypress/e2e/_3layoutTopBar.cy.ts

Large diffs are not rendered by default.

346 changes: 173 additions & 173 deletions client/cypress/e2e/_4layoutFooter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,173 +1,173 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import chaiColors from 'chai-colors';

import { mockCoinPricesServer, visitWithLoader } from 'cypress/utils/e2e';
import viewports from 'cypress/utils/viewports';
import {
HAS_ONBOARDING_BEEN_CLOSED,
IS_ONBOARDING_ALWAYS_VISIBLE,
IS_ONBOARDING_DONE,
} from 'src/constants/localStorageKeys';
import { ROOT, ROOT_ROUTES } from 'src/routes/RootRoutes/routes';

chai.use(chaiColors);

Object.values(viewports).forEach(({ device, viewportWidth, viewportHeight }) => {
describe(`[AW IS CLOSED] LayoutFooter: ${device}`, { viewportHeight, viewportWidth }, () => {
before(() => {
cy.clearLocalStorage();
});

beforeEach(() => {
mockCoinPricesServer();
localStorage.setItem(IS_ONBOARDING_ALWAYS_VISIBLE, 'false');
localStorage.setItem(IS_ONBOARDING_DONE, 'true');
localStorage.setItem(HAS_ONBOARDING_BEEN_CLOSED, 'true');
visitWithLoader(ROOT.absolute, ROOT_ROUTES.home.absolute);
});

it('Footer is visible', () => {
cy.get('[data-test=LayoutFooter]').should('be.visible');
});

it('Octant logo is visible', () => {
cy.get('[data-test=LayoutFooter__Logo]').should('be.visible');
});

it('Project info text is visible and has correct text', () => {
cy.get('[data-test=LayoutFooter__projectInfoText]').should('be.visible');
cy.get('[data-test=LayoutFooter__projectInfoText]')
.invoke('text')
.should('eq', 'Octant is a Golem Foundation project, launched in 2023.');
});

it('Project info text has link to the Golem Foundation website', () => {
cy.get('[data-test=LayoutFooter__projectInfoText__link]').should('be.visible');
cy.get('[data-test=LayoutFooter__projectInfoText__link]')
.invoke('text')
.should('eq', 'Golem Foundation');
cy.get('[data-test=LayoutFooter__projectInfoText__link]')
.invoke('attr', 'href')
.should('eq', 'https://golem.foundation/');
cy.get('[data-test=LayoutFooter__projectInfoText__link]')
.invoke('attr', 'target')
.should('eq', '_blank');
});

it('Website link is visible, has correct text and attributes', () => {
cy.get('[data-test=LayoutFooter__link--website]').should('be.visible');
cy.get('[data-test=LayoutFooter__link--website]').invoke('text').should('eq', '→ Website');
cy.get('[data-test=LayoutFooter__link--website]')
.invoke('attr', 'href')
.should('eq', 'https://octant.build/');
cy.get('[data-test=LayoutFooter__link--website]')
.invoke('attr', 'target')
.should('eq', '_blank');
});

it('Docs link is visible, has correct text and attributes', () => {
cy.get('[data-test=LayoutFooter__link--docs]').should('be.visible');
cy.get('[data-test=LayoutFooter__link--docs]').invoke('text').should('eq', '→ Docs');
cy.get('[data-test=LayoutFooter__link--docs]')
.invoke('attr', 'href')
.should('eq', 'https://docs.octant.app/');
cy.get('[data-test=LayoutFooter__link--docs]')
.invoke('attr', 'target')
.should('eq', '_blank');
});

it('Discord link is visible, has correct text and attributes', () => {
cy.get('[data-test=LayoutFooter__link--discord]').should('be.visible');
cy.get('[data-test=LayoutFooter__link--discord]').invoke('text').should('eq', '→ Discord');
cy.get('[data-test=LayoutFooter__link--discord]')
.invoke('attr', 'href')
.should('eq', 'https://discord.gg/octant');
cy.get('[data-test=LayoutFooter__link--discord]')
.invoke('attr', 'target')
.should('eq', '_blank');
});

it('Farcaster link is visible, has correct text and attributes', () => {
cy.get('[data-test=LayoutFooter__link--farcaster]').should('be.visible');
cy.get('[data-test=LayoutFooter__link--farcaster]')
.invoke('text')
.should('eq', '→ Farcaster');
cy.get('[data-test=LayoutFooter__link--farcaster]')
.invoke('attr', 'href')
.should('eq', 'https://warpcast.com/octant');
cy.get('[data-test=LayoutFooter__link--farcaster]')
.invoke('attr', 'target')
.should('eq', '_blank');
});

it('Privacy policy link is visible, has correct text and attributes', () => {
cy.get('[data-test=LayoutFooter__link--privacyPolicy]').should('be.visible');
cy.get('[data-test=LayoutFooter__link--privacyPolicy]')
.invoke('text')
.should('eq', '→ Privacy policy');
cy.get('[data-test=LayoutFooter__link--privacyPolicy]')
.invoke('attr', 'href')
.should('eq', 'https://docs.octant.app/privacy-policy.html');
cy.get('[data-test=LayoutFooter__link--privacyPolicy]')
.invoke('attr', 'target')
.should('eq', '_blank');
});

it('Terms of use link is visible, has correct text and attributes', () => {
cy.get('[data-test=LayoutFooter__link--termsOfUse]').should('be.visible');
cy.get('[data-test=LayoutFooter__link--termsOfUse]')
.invoke('text')
.should('eq', '→ Terms of use');
cy.get('[data-test=LayoutFooter__link--termsOfUse]')
.invoke('attr', 'href')
.should('eq', 'https://docs.octant.app/terms-of-use.html');
cy.get('[data-test=LayoutFooter__link--termsOfUse]')
.invoke('attr', 'target')
.should('eq', '_blank');
});

it('Newsletter text is visible and has correct value', () => {
cy.get('[data-test=LayoutFooter__newsletterText]').should('be.visible');
cy.get('[data-test=LayoutFooter__newsletterText]')
.invoke('text')
.should('eq', 'Get PGF news and updates from Octant. No spam, ever');
});

if (device === 'desktop' || device === 'large-desktop') {
it('Blog of use link is visible, has correct text and attributes', () => {
cy.get('[data-test=LayoutFooter__link--blog]').should('be.visible');
cy.get('[data-test=LayoutFooter__link--blog]').invoke('text').should('eq', '→ Blog');
cy.get('[data-test=LayoutFooter__link--blog]')
.invoke('attr', 'href')
.should('eq', 'https://blog.octant.build/');
cy.get('[data-test=LayoutFooter__link--blog]')
.invoke('attr', 'target')
.should('eq', '_blank');
});

it('Terms of use link is visible, has correct text and attributes', () => {
cy.get('[data-test=LayoutFooter__link--brandAssets]').should('be.visible');
cy.get('[data-test=LayoutFooter__link--brandAssets]')
.invoke('text')
.should('eq', '→ Brand assets');
cy.get('[data-test=LayoutFooter__link--brandAssets]')
.invoke('attr', 'href')
.should(
'eq',
'https://www.figma.com/community/file/1295533951881708349/octant-brand-assets',
);
cy.get('[data-test=LayoutFooter__link--brandAssets]')
.invoke('attr', 'target')
.should('eq', '_blank');
});
} else {
it('Blog of use link doesn`t exist', () => {
cy.get('[data-test=LayoutFooter__link--blog]').should('not.exist');
});

it('Terms of use link doesn`t exist', () => {
cy.get('[data-test=LayoutFooter__link--brandAssets]').should('not.exist');
});
}
});
});
// // eslint-disable-next-line import/no-extraneous-dependencies
// import chaiColors from 'chai-colors';

// import { mockCoinPricesServer, visitWithLoader } from 'cypress/utils/e2e';
// import viewports from 'cypress/utils/viewports';
// import {
// HAS_ONBOARDING_BEEN_CLOSED,
// IS_ONBOARDING_ALWAYS_VISIBLE,
// IS_ONBOARDING_DONE,
// } from 'src/constants/localStorageKeys';
// import { ROOT, ROOT_ROUTES } from 'src/routes/RootRoutes/routes';

// chai.use(chaiColors);

// Object.values(viewports).forEach(({ device, viewportWidth, viewportHeight }) => {
// describe(`[AW IS CLOSED] LayoutFooter: ${device}`, { viewportHeight, viewportWidth }, () => {
// before(() => {
// cy.clearLocalStorage();
// });

// beforeEach(() => {
// mockCoinPricesServer();
// localStorage.setItem(IS_ONBOARDING_ALWAYS_VISIBLE, 'false');
// localStorage.setItem(IS_ONBOARDING_DONE, 'true');
// localStorage.setItem(HAS_ONBOARDING_BEEN_CLOSED, 'true');
// visitWithLoader(ROOT.absolute, ROOT_ROUTES.home.absolute);
// });

// it('Footer is visible', () => {
// cy.get('[data-test=LayoutFooter]').should('be.visible');
// });

// it('Octant logo is visible', () => {
// cy.get('[data-test=LayoutFooter__Logo]').should('be.visible');
// });

// it('Project info text is visible and has correct text', () => {
// cy.get('[data-test=LayoutFooter__projectInfoText]').should('be.visible');
// cy.get('[data-test=LayoutFooter__projectInfoText]')
// .invoke('text')
// .should('eq', 'Octant is a Golem Foundation project, launched in 2023.');
// });

// it('Project info text has link to the Golem Foundation website', () => {
// cy.get('[data-test=LayoutFooter__projectInfoText__link]').should('be.visible');
// cy.get('[data-test=LayoutFooter__projectInfoText__link]')
// .invoke('text')
// .should('eq', 'Golem Foundation');
// cy.get('[data-test=LayoutFooter__projectInfoText__link]')
// .invoke('attr', 'href')
// .should('eq', 'https://golem.foundation/');
// cy.get('[data-test=LayoutFooter__projectInfoText__link]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });

// it('Website link is visible, has correct text and attributes', () => {
// cy.get('[data-test=LayoutFooter__link--website]').should('be.visible');
// cy.get('[data-test=LayoutFooter__link--website]').invoke('text').should('eq', '→ Website');
// cy.get('[data-test=LayoutFooter__link--website]')
// .invoke('attr', 'href')
// .should('eq', 'https://octant.build/');
// cy.get('[data-test=LayoutFooter__link--website]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });

// it('Docs link is visible, has correct text and attributes', () => {
// cy.get('[data-test=LayoutFooter__link--docs]').should('be.visible');
// cy.get('[data-test=LayoutFooter__link--docs]').invoke('text').should('eq', '→ Docs');
// cy.get('[data-test=LayoutFooter__link--docs]')
// .invoke('attr', 'href')
// .should('eq', 'https://docs.octant.app/');
// cy.get('[data-test=LayoutFooter__link--docs]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });

// it('Discord link is visible, has correct text and attributes', () => {
// cy.get('[data-test=LayoutFooter__link--discord]').should('be.visible');
// cy.get('[data-test=LayoutFooter__link--discord]').invoke('text').should('eq', '→ Discord');
// cy.get('[data-test=LayoutFooter__link--discord]')
// .invoke('attr', 'href')
// .should('eq', 'https://discord.gg/octant');
// cy.get('[data-test=LayoutFooter__link--discord]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });

// it('Farcaster link is visible, has correct text and attributes', () => {
// cy.get('[data-test=LayoutFooter__link--farcaster]').should('be.visible');
// cy.get('[data-test=LayoutFooter__link--farcaster]')
// .invoke('text')
// .should('eq', '→ Farcaster');
// cy.get('[data-test=LayoutFooter__link--farcaster]')
// .invoke('attr', 'href')
// .should('eq', 'https://warpcast.com/octant');
// cy.get('[data-test=LayoutFooter__link--farcaster]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });

// it('Privacy policy link is visible, has correct text and attributes', () => {
// cy.get('[data-test=LayoutFooter__link--privacyPolicy]').should('be.visible');
// cy.get('[data-test=LayoutFooter__link--privacyPolicy]')
// .invoke('text')
// .should('eq', '→ Privacy policy');
// cy.get('[data-test=LayoutFooter__link--privacyPolicy]')
// .invoke('attr', 'href')
// .should('eq', 'https://docs.octant.app/privacy-policy.html');
// cy.get('[data-test=LayoutFooter__link--privacyPolicy]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });

// it('Terms of use link is visible, has correct text and attributes', () => {
// cy.get('[data-test=LayoutFooter__link--termsOfUse]').should('be.visible');
// cy.get('[data-test=LayoutFooter__link--termsOfUse]')
// .invoke('text')
// .should('eq', '→ Terms of use');
// cy.get('[data-test=LayoutFooter__link--termsOfUse]')
// .invoke('attr', 'href')
// .should('eq', 'https://docs.octant.app/terms-of-use.html');
// cy.get('[data-test=LayoutFooter__link--termsOfUse]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });

// it('Newsletter text is visible and has correct value', () => {
// cy.get('[data-test=LayoutFooter__newsletterText]').should('be.visible');
// cy.get('[data-test=LayoutFooter__newsletterText]')
// .invoke('text')
// .should('eq', 'Get PGF news and updates from Octant. No spam, ever');
// });

// if (device === 'desktop' || device === 'large-desktop') {
// it('Blog of use link is visible, has correct text and attributes', () => {
// cy.get('[data-test=LayoutFooter__link--blog]').should('be.visible');
// cy.get('[data-test=LayoutFooter__link--blog]').invoke('text').should('eq', '→ Blog');
// cy.get('[data-test=LayoutFooter__link--blog]')
// .invoke('attr', 'href')
// .should('eq', 'https://blog.octant.build/');
// cy.get('[data-test=LayoutFooter__link--blog]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });

// it('Terms of use link is visible, has correct text and attributes', () => {
// cy.get('[data-test=LayoutFooter__link--brandAssets]').should('be.visible');
// cy.get('[data-test=LayoutFooter__link--brandAssets]')
// .invoke('text')
// .should('eq', '→ Brand assets');
// cy.get('[data-test=LayoutFooter__link--brandAssets]')
// .invoke('attr', 'href')
// .should(
// 'eq',
// 'https://www.figma.com/community/file/1295533951881708349/octant-brand-assets',
// );
// cy.get('[data-test=LayoutFooter__link--brandAssets]')
// .invoke('attr', 'target')
// .should('eq', '_blank');
// });
// } else {
// it('Blog of use link doesn`t exist', () => {
// cy.get('[data-test=LayoutFooter__link--blog]').should('not.exist');
// });

// it('Terms of use link doesn`t exist', () => {
// cy.get('[data-test=LayoutFooter__link--brandAssets]').should('not.exist');
// });
// }
// });
// });
Loading

0 comments on commit bd860f7

Please sign in to comment.