mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
Add in pending tests for missing project removal functionality
This commit is contained in:
parent
0f8baaaa45
commit
c3d266f3ba
1 changed files with 85 additions and 76 deletions
|
@ -107,6 +107,7 @@ describe('studio projects', () => {
|
|||
expect(selectCanAddProjects(state)).toBe(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('can remove projects', () => {
|
||||
test.each([
|
||||
['admin', true],
|
||||
|
@ -118,9 +119,11 @@ describe('studio projects', () => {
|
|||
['logged out', false]
|
||||
])('%s: %s', (role, expected) => {
|
||||
setStateByRole(role);
|
||||
// TODO this permission is wrong, curators can only remove projects they added
|
||||
expect(selectCanRemoveProjects(state)).toBe(expected);
|
||||
});
|
||||
// TODO this permission is wrong, curators can only remove projects they added
|
||||
test.skip('anyone can remove one of their projects', () => {});
|
||||
test.skip('curators can remove only projects they', () => {});
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -232,7 +235,9 @@ describe('studio comments', () => {
|
|||
expect(selectCanEditOpenToAll(state)).toBe(expected);
|
||||
});
|
||||
});
|
||||
describe('studio members', () => {
|
||||
});
|
||||
|
||||
describe('studio members', () => {
|
||||
describe('can accept invitation', () => {
|
||||
test.each([
|
||||
['admin', false],
|
||||
|
@ -248,6 +253,7 @@ describe('studio comments', () => {
|
|||
expect(selectShowCuratorInvite(state)).toBe(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('can promote curators', () => {
|
||||
test.each([
|
||||
['admin', false],
|
||||
|
@ -262,6 +268,7 @@ describe('studio comments', () => {
|
|||
expect(selectCanPromoteCurators(state)).toBe(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('can remove curators', () => {
|
||||
test.each([
|
||||
['admin', true],
|
||||
|
@ -276,6 +283,7 @@ describe('studio comments', () => {
|
|||
expect(selectCanRemoveCurators(state)).toBe(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('can remove managers', () => {
|
||||
test.each([
|
||||
['admin', true],
|
||||
|
@ -289,6 +297,7 @@ describe('studio comments', () => {
|
|||
setStateByRole(role);
|
||||
expect(selectCanRemoveManager(state, '123')).toBe(expected);
|
||||
});
|
||||
|
||||
describe('nobody can remove the studio creator', () => {
|
||||
test.each([
|
||||
['admin', false],
|
||||
|
@ -305,6 +314,7 @@ describe('studio comments', () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('can invite curators', () => {
|
||||
test.each([
|
||||
['admin', false],
|
||||
|
@ -319,5 +329,4 @@ describe('studio comments', () => {
|
|||
expect(selectCanInviteCurators(state)).toBe(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue