Merge pull request #5945 from LLK/release/2021-08-18

[Master] release/2021-08-18
This commit is contained in:
Karishma Chadha 2021-08-19 13:40:09 -04:00 committed by GitHub
commit 67eebd57c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 126 additions and 56 deletions

86
package-lock.json generated
View file

@ -308,9 +308,9 @@
}
},
"@babel/parser": {
"version": "7.15.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.2.tgz",
"integrity": "sha512-bMJXql1Ss8lFnvr11TZDH4ArtwlAS5NG9qBmdiFW2UHHm6MVoR+GDc5XE2b9K938cyjc9O6/+vjjcffLDtfuDg==",
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz",
"integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==",
"dev": true
},
"@babel/template": {
@ -504,9 +504,9 @@
}
},
"electron-to-chromium": {
"version": "1.3.802",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.802.tgz",
"integrity": "sha512-dXB0SGSypfm3iEDxrb5n/IVKeX4uuTnFHdve7v+yKJqNpEP0D4mjFJ8e1znmSR+OOVlVC+kDO6f2kAkTFXvJBg==",
"version": "1.3.808",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.808.tgz",
"integrity": "sha512-espnsbWTuUw0a2jMwfabCc09py2ujB+FZZE1hZWn5yYijEmxzEhdhTLKUfZGjynHvdIMQ4X/Pr/t8s4eiyH/QQ==",
"dev": true
},
"semver": {
@ -695,9 +695,9 @@
}
},
"@babel/parser": {
"version": "7.15.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.2.tgz",
"integrity": "sha512-bMJXql1Ss8lFnvr11TZDH4ArtwlAS5NG9qBmdiFW2UHHm6MVoR+GDc5XE2b9K938cyjc9O6/+vjjcffLDtfuDg==",
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz",
"integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==",
"dev": true
},
"@babel/template": {
@ -914,9 +914,9 @@
}
},
"@babel/parser": {
"version": "7.15.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.2.tgz",
"integrity": "sha512-bMJXql1Ss8lFnvr11TZDH4ArtwlAS5NG9qBmdiFW2UHHm6MVoR+GDc5XE2b9K938cyjc9O6/+vjjcffLDtfuDg==",
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz",
"integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==",
"dev": true
},
"@babel/template": {
@ -1076,14 +1076,14 @@
"dev": true
},
"@babel/helpers": {
"version": "7.14.8",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.8.tgz",
"integrity": "sha512-ZRDmI56pnV+p1dH6d+UN6GINGz7Krps3+270qqI9UJ4wxYThfAIcI5i7j5vXC4FJ3Wap+S9qcebxeYiqn87DZw==",
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz",
"integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==",
"dev": true,
"requires": {
"@babel/template": "^7.14.5",
"@babel/traverse": "^7.14.8",
"@babel/types": "^7.14.8"
"@babel/traverse": "^7.15.0",
"@babel/types": "^7.15.0"
},
"dependencies": {
"@babel/code-frame": {
@ -1147,9 +1147,9 @@
}
},
"@babel/parser": {
"version": "7.15.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.2.tgz",
"integrity": "sha512-bMJXql1Ss8lFnvr11TZDH4ArtwlAS5NG9qBmdiFW2UHHm6MVoR+GDc5XE2b9K938cyjc9O6/+vjjcffLDtfuDg==",
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz",
"integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==",
"dev": true
},
"@babel/template": {
@ -20977,21 +20977,21 @@
}
},
"scratch-blocks": {
"version": "0.1.0-prerelease.20210811082835",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210811082835.tgz",
"integrity": "sha512-Rw9S72of8SMAv7Qz6ZVKLePLHx4m/rmWNcJ65hTFVWGv21SvBp7RSmqCcyHDvQzKOHjIxQMSgc+fW2qStSQDAA==",
"version": "0.1.0-prerelease.20210818074602",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210818074602.tgz",
"integrity": "sha512-6HCt71AvQmmbZgaWB3AGTBRPI02mEbtM5baLwRLB1U1AxCgm3R12ybFqCmxCkLbT7YuPiImSo9IfxZ9X/Wswlw==",
"dev": true,
"requires": {
"exports-loader": "0.6.3",
"google-closure-library": "20190301.0.0",
"imports-loader": "0.6.5",
"scratch-l10n": "3.14.20210811031521"
"scratch-l10n": "3.14.20210818031501"
}
},
"scratch-gui": {
"version": "0.1.0-prerelease.20210811131219",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210811131219.tgz",
"integrity": "sha512-1BDkhRNmFbm0KIs9e0Z8WBF9hUcHv1+SKRDDOJ8WRaZEgG15TLFaBm9jeYQLhXbdZ/LNm19OxMgicI6syuO2+A==",
"version": "0.1.0-prerelease.20210818113752",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210818113752.tgz",
"integrity": "sha512-sV0WuEfD5fujDI23I4We5DkKMiAWIgu1Tr/Si4GMj2xpqF3q4U3LlRS4iuHU+nmiVqrPwEr+SXCh4pX8MjwgYw==",
"dev": true,
"requires": {
"arraybuffer-loader": "^1.0.6",
@ -21042,14 +21042,14 @@
"redux": "3.7.2",
"redux-throttle": "0.1.1",
"scratch-audio": "0.1.0-prerelease.20200528195344",
"scratch-blocks": "0.1.0-prerelease.20210811082835",
"scratch-l10n": "3.14.20210811031521",
"scratch-paint": "0.2.0-prerelease.20210811051056",
"scratch-blocks": "0.1.0-prerelease.20210818074602",
"scratch-l10n": "3.14.20210818031501",
"scratch-paint": "0.2.0-prerelease.20210818072858",
"scratch-render": "0.1.0-prerelease.20210325231800",
"scratch-render-fonts": "1.0.0-prerelease.20210401210003",
"scratch-storage": "1.3.5",
"scratch-svg-renderer": "0.2.0-prerelease.20210727023023",
"scratch-vm": "0.2.0-prerelease.20210811102104",
"scratch-vm": "0.2.0-prerelease.20210812043817",
"startaudiocontext": "1.2.1",
"style-loader": "^0.23.0",
"text-encoding": "0.7.0",
@ -21212,9 +21212,9 @@
"dev": true
},
"electron-to-chromium": {
"version": "1.3.802",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.802.tgz",
"integrity": "sha512-dXB0SGSypfm3iEDxrb5n/IVKeX4uuTnFHdve7v+yKJqNpEP0D4mjFJ8e1znmSR+OOVlVC+kDO6f2kAkTFXvJBg==",
"version": "1.3.811",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.811.tgz",
"integrity": "sha512-hv3kgf6YSd+jQ7J+7Kdm44yux/1vxcAwfGV/6M6Nq4E9zJ3Bml/P2+vULCvqLS6Lh9knBCQ7iEMvyeDiGe5EbA==",
"dev": true
},
"has-flag": {
@ -21478,9 +21478,9 @@
}
},
"scratch-l10n": {
"version": "3.14.20210811031521",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.14.20210811031521.tgz",
"integrity": "sha512-3MFVheuqNm1pOYHrvV/zT3K89SiClwwAEkj/loAeJ6a5mwfblPLWe0PeRq1cuRvxQQuGh2Nrrl/WT8oaDkG9xQ==",
"version": "3.14.20210818031501",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.14.20210818031501.tgz",
"integrity": "sha512-UlOFn/DhrKAMfbvSUNmdBhDwr6z8zhwPMwBoiIHajllraVELfUsgAyFZgJyCriwpt6Ojxe+aGCn+lTuqyYpIow==",
"dev": true,
"requires": {
"@babel/cli": "^7.1.2",
@ -21490,9 +21490,9 @@
}
},
"scratch-paint": {
"version": "0.2.0-prerelease.20210811051056",
"resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-0.2.0-prerelease.20210811051056.tgz",
"integrity": "sha512-l8AH7p7Y6EZEaTI+txbU6+bYhWpCyz8gAQKt0lib2gQaQCP7CM2cC0hgHUbtrhsUrpuUI4asVKHr5b+R8GK/0w==",
"version": "0.2.0-prerelease.20210818072858",
"resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-0.2.0-prerelease.20210818072858.tgz",
"integrity": "sha512-jsQ0Swpms86ky5uP/eETr27uhV7zc5AphBvTSg+7lt3ZC2oxToRuaOP7EQSUf/7seHd1ph2AQwf+gN6NiofxFw==",
"dev": true,
"requires": {
"@scratch/paper": "0.11.20200728195508",
@ -21746,9 +21746,9 @@
"dev": true
},
"scratch-vm": {
"version": "0.2.0-prerelease.20210811102104",
"resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-0.2.0-prerelease.20210811102104.tgz",
"integrity": "sha512-VUQoYg5byWlqdCuDeZ7gGDhyaSZa6SNVMHuHef+5g9z/sB7ezNJvSYTyTGqiRv3ygGItbXZ0/5CFF8/B+Xc73A==",
"version": "0.2.0-prerelease.20210812043817",
"resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-0.2.0-prerelease.20210812043817.tgz",
"integrity": "sha512-DFWe5YGASTJ7bNIy4wMXjaAItNlJvxpH5qbjDZxosuU1XVdmipaUDJt4F4G+IfSqb+EwExtX4XS01FiWThqQ6w==",
"dev": true,
"requires": {
"@vernier/godirect": "1.5.0",

View file

@ -130,8 +130,8 @@
"redux-mock-store": "1.5.4",
"redux-thunk": "2.0.1",
"sass-loader": "6.0.6",
"scratch-gui": "0.1.0-prerelease.20210811131219",
"scratch-l10n": "3.14.20210811031521",
"scratch-gui": "0.1.0-prerelease.20210818113752",
"scratch-l10n": "3.14.20210818031501",
"selenium-webdriver": "3.6.0",
"slick-carousel": "1.6.0",
"style-loader": "0.12.3",

View file

@ -112,6 +112,8 @@
"studio.activityBecomeCurator": "{newCuratorProfileLink} accepted an invitation from {inviterProfileLink} to curate this studio",
"studio.activityRemoveCurator": "{removerProfileLink} removed the curator {removedProfileLink}",
"studio.activityBecomeOwner": "{promotedProfileLink} was promoted to manager by {promotorProfileLink}",
"studio.activityBecomeHost": "{newHostProfileLink} was made the studio host by {actorProfileLink}",
"studio.activityBecomeHostAdminActor": "{newHostProfileLink} was made the studio host by a Scratch Team member",
"studio.lastUpdated": "Updated {lastUpdatedDate, date, medium}",
"studio.followerCount": "{followerCount} followers",

View file

@ -166,6 +166,44 @@ const getComponentForItem = item => {
/>
</SocialMessage>
);
case 'becomehoststudio':
return (
<SocialMessage
datetime={item.datetime_created}
iconSrc="/svgs/studio/activity-curator.svg"
iconAlt="curator activity icon"
imgClassName="studio-activity-icon"
key={item.id}
>
{item.admin_actor ?
<FormattedMessage
id="studio.activityBecomeHostAdminActor"
values={{
newHostProfileLink: (
<a href={`/users/${item.recipient_username}`}>
{item.recipient_username}
</a>
)
}}
/> :
<FormattedMessage
id="studio.activityBecomeHost"
values={{
newHostProfileLink: (
<a href={`/users/${item.recipient_username}`}>
{item.recipient_username}
</a>
),
actorProfileLink: (
<a href={`/users/${item.recipient_username}`}>
{item.actor_username}
</a>
)
}}
/>
}
</SocialMessage>
);
}
};

View file

@ -89,17 +89,6 @@ describe('www-integration my_stuff', () => {
await expect(dropDownVisible).toBe(true);
});
test('+ New Studio button should take you to the studio page', async ()=>{
await driver.get(rateLimitCheck);
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
await driver.sleep(500);
// my stuff also has an element with the id tabs
let tabs = await findByXpath('//div[@class="studio-tabs"]');
let tabsVisible = await tabs.isDisplayed();
expect(tabsVisible).toBe(true);
});
test('+ New Project button should open the editor', async () =>{
await driver.get(myStuffURL);
await clickText('+ New Project');
@ -108,4 +97,45 @@ describe('www-integration my_stuff', () => {
await expect(gfVisible).toBe(true);
});
test('+ New Studio button should take you to the studio page', async ()=>{
await driver.get(rateLimitCheck);
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
let tabs = await findByXpath('//div[@class="studio-tabs"]');
let tabsVisible = await tabs.isDisplayed();
expect(tabsVisible).toBe(true);
});
test('New studio rate limited to five', async () =>{
await driver.get(rateLimitCheck);
// 1st studio
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
await findByXpath('//div[@class="studio-tabs"]');
// 2nd studio
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
await findByXpath('//div[@class="studio-tabs"]');
// 3rd studio
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
await findByXpath('//div[@class="studio-tabs"]');
// 4th studio
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
await findByXpath('//div[@class="studio-tabs"]');
// 5th studio
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
await findByXpath('//div[@class="studio-tabs"]');
// 6th studio should fail
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
let alertMessage = await findByXpath('//div[contains(@class, "alert-error")]');
let errVisible = await alertMessage.isDisplayed();
await expect(errVisible).toBe(true);
await driver.get(rateLimitCheck);
});
});