Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCT-2144: Calendar E2E #564

Merged
merged 23 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
04861fe
oct-2144: calendar e2e
jmikolajczyk Nov 22, 2024
432c51b
oct-2144: milestones fix
jmikolajczyk Nov 22, 2024
2d6db03
oct-2144: calendar e2e fixes
jmikolajczyk Nov 25, 2024
266d585
oct-2144: calendar e2e update
jmikolajczyk Nov 25, 2024
4c5a6d3
Merge branch 'master' into test/oct-2144-calendar-e2e
jmikolajczyk Nov 25, 2024
087bff4
oct-2144: _9calendar
jmikolajczyk Nov 25, 2024
a6cfa43
calendar - test 1
jmikolajczyk Nov 25, 2024
0a62b29
oct-2144: e2e timezone
jmikolajczyk Nov 25, 2024
db50b99
oct-2144: deploy pr epoch duration/desicion window update
jmikolajczyk Nov 26, 2024
b538122
oct-2144: test 2
jmikolajczyk Nov 26, 2024
15acfe9
oct-2144: calendar alert test 1
jmikolajczyk Nov 26, 2024
421bb9a
oct-2144: calendar alert test 2
jmikolajczyk Nov 26, 2024
9a03f85
oct-2144: calendar alert test 3
jmikolajczyk Nov 26, 2024
1f0bbea
oct-2144: calendar alert test 4
jmikolajczyk Nov 26, 2024
22728a3
oct-2144: calendar alert test 5 mobile
jmikolajczyk Nov 26, 2024
cfea52b
oct-2144: calendar alert test 5 all viewports
jmikolajczyk Nov 26, 2024
0deda87
oct-2144: calendar alert test 6 all viewports
jmikolajczyk Nov 26, 2024
52070e4
oct-2144: calendar e2e fixed
jmikolajczyk Nov 26, 2024
bd860f7
oct-2144: calendar alert test 7
jmikolajczyk Nov 26, 2024
abdc761
oct-2144: calendar alert test 8
jmikolajczyk Nov 26, 2024
9a5ca98
oct-2144: calendar alert test 9
jmikolajczyk Nov 26, 2024
c4acac3
oct-2144: calendar alert test 10
jmikolajczyk Nov 27, 2024
ed669aa
oct-2144: calendar e2e - final
jmikolajczyk Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
491 changes: 243 additions & 248 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