-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2cfb892
commit 56b978f
Showing
4 changed files
with
125 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { buildItemPath } from '../../../../src/config/paths'; | ||
import { | ||
ITEM_SETTINGS_BUTTON_CLASS, | ||
SETTINGS_CHATBOX_TOGGLE, | ||
SETTINGS_PINNED_TOGGLE, | ||
} from '../../../../src/config/selectors'; | ||
import { ITEMS_SETTINGS } from '../../../fixtures/items'; | ||
|
||
describe('Item Settings', () => { | ||
beforeEach(() => { | ||
cy.setUpApi(ITEMS_SETTINGS); | ||
}); | ||
|
||
describe('Chatbox Settings', () => { | ||
it('Disabling Chatbox', () => { | ||
cy.visit(buildItemPath(ITEMS_SETTINGS.items[0].id)); | ||
cy.get(`.${ITEM_SETTINGS_BUTTON_CLASS}`).click(); | ||
|
||
cy.get(`#${SETTINGS_CHATBOX_TOGGLE}`).should('be.checked'); | ||
|
||
cy.get(`#${SETTINGS_CHATBOX_TOGGLE}`).click(); | ||
|
||
cy.get(`#${SETTINGS_CHATBOX_TOGGLE}`).should('not.be.checked'); | ||
}); | ||
|
||
it('Enabling Chatbox', () => { | ||
cy.visit(buildItemPath(ITEMS_SETTINGS.items[1].id)); | ||
cy.get(`.${ITEM_SETTINGS_BUTTON_CLASS}`).click(); | ||
|
||
cy.get(`#${SETTINGS_CHATBOX_TOGGLE}`).should('not.be.checked'); | ||
|
||
cy.get(`#${SETTINGS_CHATBOX_TOGGLE}`).click(); | ||
|
||
cy.get(`#${SETTINGS_CHATBOX_TOGGLE}`).should('be.checked'); | ||
}); | ||
}); | ||
|
||
describe('Pinned Settings', () => { | ||
it('Unpin Items', () => { | ||
cy.visit(buildItemPath(ITEMS_SETTINGS.items[0].id)); | ||
cy.get(`.${ITEM_SETTINGS_BUTTON_CLASS}`).click(); | ||
|
||
cy.get(`#${SETTINGS_PINNED_TOGGLE}`).should('be.checked'); | ||
|
||
cy.get(`#${SETTINGS_PINNED_TOGGLE}`).click(); | ||
|
||
cy.get(`#${SETTINGS_PINNED_TOGGLE}`).should('not.be.checked'); | ||
}); | ||
|
||
it('Pin Item', () => { | ||
cy.visit(buildItemPath(ITEMS_SETTINGS.items[1].id)); | ||
cy.get(`.${ITEM_SETTINGS_BUTTON_CLASS}`).click(); | ||
|
||
cy.get(`#${SETTINGS_PINNED_TOGGLE}`).should('not.be.checked'); | ||
|
||
cy.get(`#${SETTINGS_PINNED_TOGGLE}`).click(); | ||
|
||
cy.get(`#${SETTINGS_PINNED_TOGGLE}`).should('be.checked'); | ||
}); | ||
}); | ||
}); |
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