-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: show created at and update at times feat: add click on entire card and actions inside the item feat: hide copy button if user isn't logged feat: change the layout of the summary fix: remove my-list from header fix: grid sizes and cards --------- Co-authored-by: spaenleh <spaenleh@gmail.com>
- Loading branch information
1 parent
619bf92
commit 83c5167
Showing
72 changed files
with
3,575 additions
and
2,852 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,49 @@ | ||
import { PUBLISHED_ITEMS } from '../../fixtures/items'; | ||
import { buildCollectionRoute } from '../../../src/config/routes'; | ||
import { COLLECTION_LOADING_TIME } from '../../support/constants'; | ||
import { SUMMARY_CATEGORIES_CONTAINER_ID } from '../../../src/config/selectors'; | ||
import { SAMPLE_CATEGORIES } from '../../fixtures/categories'; | ||
import { buildPublicAndPrivateEnvironments } from '../../fixtures/environment'; | ||
import { | ||
SUMMARY_CATEGORIES_CONTAINER_ID, | ||
SUMMARY_LANGUAGES_CONTAINER_ID, | ||
} from '../../../src/config/selectors'; | ||
import { PUBLISHED_ITEMS } from '../../fixtures/items'; | ||
import { COLLECTION_LOADING_TIME } from '../../support/constants'; | ||
|
||
describe('Categories in Summary', () => { | ||
buildPublicAndPrivateEnvironments().forEach((environment) => { | ||
it(`Display item's categories for ${environment.currentMember.name}`, () => { | ||
it( | ||
`Display item's categories for ${environment.currentMember.name}`, | ||
{ defaultCommandTimeout: 10000 }, | ||
() => { | ||
cy.setUpApi(environment); | ||
|
||
const item = PUBLISHED_ITEMS[0]; | ||
cy.visit(buildCollectionRoute(item.id)); | ||
|
||
item.categories.forEach(({ categoryId }) => { | ||
const category = SAMPLE_CATEGORIES.find( | ||
({ id }) => id === categoryId, | ||
); | ||
cy.get(`#${SUMMARY_CATEGORIES_CONTAINER_ID}`).should( | ||
'contain', | ||
category?.name, | ||
); | ||
}); | ||
}, | ||
); | ||
|
||
it(`Child shows parent's categories ${environment.currentMember.name}`, () => { | ||
cy.setUpApi(environment); | ||
|
||
const item = PUBLISHED_ITEMS[0]; | ||
cy.visit(buildCollectionRoute(item.id)); | ||
cy.wait(COLLECTION_LOADING_TIME); | ||
|
||
cy.get(`#${SUMMARY_LANGUAGES_CONTAINER_ID}`).should('not.exist'); | ||
item.categories.forEach(({ categoryId }) => { | ||
const category = SAMPLE_CATEGORIES.find(({ id }) => id === categoryId); | ||
cy.get(`#${SUMMARY_CATEGORIES_CONTAINER_ID}`).should( | ||
'contain', | ||
category?.name, | ||
); | ||
}); | ||
}); | ||
|
||
it(`Display item's language for ${environment.currentMember.name}`, () => { | ||
cy.setUpApi(environment); | ||
const child = PUBLISHED_ITEMS[1]; | ||
|
||
const item = PUBLISHED_ITEMS[4]; | ||
cy.visit(buildCollectionRoute(item.id)); | ||
cy.visit(buildCollectionRoute(child.id)); | ||
cy.wait(COLLECTION_LOADING_TIME); | ||
|
||
cy.get(`#${SUMMARY_CATEGORIES_CONTAINER_ID}`).should('not.exist'); | ||
const categoryContainer = cy.get(`#${SUMMARY_CATEGORIES_CONTAINER_ID}`); | ||
|
||
item.categories.forEach(({ categoryId }) => { | ||
const category = SAMPLE_CATEGORIES.find(({ id }) => id === categoryId); | ||
cy.get(`#${SUMMARY_LANGUAGES_CONTAINER_ID}`).should( | ||
'contain', | ||
category?.name, | ||
); | ||
categoryContainer.should('contain', category?.name); | ||
}); | ||
}); | ||
|
||
it(`No category to display for ${environment.currentMember.name}`, () => { | ||
cy.setUpApi(environment); | ||
|
||
const item = PUBLISHED_ITEMS[2]; | ||
cy.visit(buildCollectionRoute(item.id)); | ||
cy.wait(COLLECTION_LOADING_TIME); | ||
|
||
cy.get(`#${SUMMARY_LANGUAGES_CONTAINER_ID}`).should('not.exist'); | ||
cy.get(`#${SUMMARY_CATEGORIES_CONTAINER_ID}`).should('not.exist'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
import { PUBLISHED_ITEMS } from '../../fixtures/items'; | ||
import { buildCollectionRoute } from '../../../src/config/routes'; | ||
import { COLLECTION_LOADING_TIME } from '../../support/constants'; | ||
import { | ||
SUMMARY_CC_LICENSE_CONTAINER_ID, | ||
SUMMARY_CC_LICENSE_NO_LICENSE_ID, | ||
} from '../../../src/config/selectors'; | ||
import { buildPublicAndPrivateEnvironments } from '../../fixtures/environment'; | ||
import { SUMMARY_CC_LICENSE_CONTAINER_ID } from '../../../src/config/selectors'; | ||
import { PUBLISHED_ITEMS } from '../../fixtures/items'; | ||
|
||
describe('CC License in Summary', () => { | ||
buildPublicAndPrivateEnvironments().forEach((environment) => { | ||
it(`Display item's cc license for ${environment.currentMember.name}`, () => { | ||
cy.setUpApi(environment); | ||
it( | ||
`Display item's cc license for ${environment.currentMember.name}`, | ||
{ defaultCommandTimeout: 10000 }, | ||
() => { | ||
cy.setUpApi(environment); | ||
|
||
const item = PUBLISHED_ITEMS[0]; | ||
cy.visit(buildCollectionRoute(item.id)); | ||
|
||
const item = PUBLISHED_ITEMS[0]; | ||
cy.visit(buildCollectionRoute(item.id)); | ||
cy.wait(COLLECTION_LOADING_TIME); | ||
cy.get(`#${SUMMARY_CC_LICENSE_CONTAINER_ID}`).should('be.exist'); | ||
}, | ||
); | ||
|
||
cy.get(`#${SUMMARY_CC_LICENSE_CONTAINER_ID}`).should('be.exist'); | ||
}); | ||
it( | ||
`No cc license to display for ${environment.currentMember.name}`, | ||
{ defaultCommandTimeout: 10000 }, | ||
() => { | ||
cy.setUpApi(environment); | ||
|
||
it(`No cc license to display for ${environment.currentMember.name}`, () => { | ||
cy.setUpApi(environment); | ||
const item = PUBLISHED_ITEMS[5]; | ||
|
||
const item = PUBLISHED_ITEMS[2]; | ||
cy.visit(buildCollectionRoute(item.id)); | ||
cy.wait(COLLECTION_LOADING_TIME); | ||
cy.visit(buildCollectionRoute(item.id)); | ||
|
||
cy.get(`#${SUMMARY_CC_LICENSE_CONTAINER_ID}`).should('not.exist'); | ||
}); | ||
cy.get(`#${SUMMARY_CC_LICENSE_NO_LICENSE_ID}`).should('exist'); | ||
}, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.