forked from graasp/client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create navigation island (graasp#576)
* feat: create navigation island * fix: tests * fix: sonar cloud issues * fix: remove cnacel-in-progress * fix: shadow color, tests and redirect on item index page * fix: update components and add test for island * fix: translate and add button to go to home * fix: update prev-next buttons to retunr null if both are null * fix: use hooks to render the island only when there is content inside * fix: update test
- Loading branch information
Showing
30 changed files
with
871 additions
and
454 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { buildContentPagePath } from '@/config/paths'; | ||
import { ITEM_CHATBOX_BUTTON_ID } from '@/config/selectors'; | ||
|
||
import { | ||
DOCUMENT_WITHOUT_CHAT_BOX, | ||
DOCUMENT_WITH_CHAT_BOX, | ||
} from '../fixtures/items'; | ||
|
||
describe('Island', () => { | ||
it('Show island with chat button on document with chat', () => { | ||
const item = DOCUMENT_WITH_CHAT_BOX; | ||
cy.setUpApi({ | ||
items: [item], | ||
}); | ||
cy.visit(buildContentPagePath({ rootId: item.id, itemId: item.id })); | ||
cy.get(`#${ITEM_CHATBOX_BUTTON_ID}`).should('be.visible'); | ||
}); | ||
|
||
it('Hide island on document without chat', () => { | ||
const item = DOCUMENT_WITHOUT_CHAT_BOX; | ||
cy.setUpApi({ | ||
items: [item], | ||
}); | ||
cy.visit(buildContentPagePath({ rootId: item.id, itemId: item.id })); | ||
cy.get(`#${ITEM_CHATBOX_BUTTON_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
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.