mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
Clean up studio integration tests
This commit is contained in:
parent
f67fcdc495
commit
6ec730887c
2 changed files with 2 additions and 4 deletions
|
@ -159,7 +159,6 @@ class SeleniumHelper {
|
||||||
await driver.sleep(500);
|
await driver.sleep(500);
|
||||||
await this.clickXpath('//button[contains(@class, "button") and ' +
|
await this.clickXpath('//button[contains(@class, "button") and ' +
|
||||||
'contains(@class, "submit-button") and contains(@class, "white")]');
|
'contains(@class, "submit-button") and contains(@class, "white")]');
|
||||||
// await this.findByXpath('//span[contains(@class, "profile-name")]');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
urlMatches (regex) {
|
urlMatches (regex) {
|
||||||
|
|
|
@ -85,7 +85,7 @@ describe('studio management', () => {
|
||||||
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
|
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
|
||||||
await findByXpath('//div[@class="studio-tabs"]');
|
await findByXpath('//div[@class="studio-tabs"]');
|
||||||
promoteStudioURL = await driver.getCurrentUrl();
|
promoteStudioURL = await driver.getCurrentUrl();
|
||||||
curatorTab = await promoteStudioURL + 'curators';
|
curatorTab = promoteStudioURL + 'curators';
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
@ -134,11 +134,10 @@ describe('studio management', () => {
|
||||||
// promote user3
|
// promote user3
|
||||||
let user3href = '/users/' + username3;
|
let user3href = '/users/' + username3;
|
||||||
// click kebab menu on the user tile
|
// click kebab menu on the user tile
|
||||||
let kebabMenuXpath = '//a[@href = "' + user3href + '"]/' +
|
let kebabMenuXpath = `//a[@href = "${user3href}"]/` +
|
||||||
'following-sibling::div[@class="overflow-menu-container"]';
|
'following-sibling::div[@class="overflow-menu-container"]';
|
||||||
await clickXpath(kebabMenuXpath + '/button[@class="overflow-menu-trigger"]');
|
await clickXpath(kebabMenuXpath + '/button[@class="overflow-menu-trigger"]');
|
||||||
// click promote
|
// click promote
|
||||||
// await clickXpath(kebabMenuXpath + '/ul/li/button[@class="promote-button"]');
|
|
||||||
// await clickXpath('//button[@class="promote-menu-button"]'); //<-- I think this will do it
|
// await clickXpath('//button[@class="promote-menu-button"]'); //<-- I think this will do it
|
||||||
await clickXpath(kebabMenuXpath + '/ul/li/button/span[contains(text(), "Promote")]/..');
|
await clickXpath(kebabMenuXpath + '/ul/li/button/span[contains(text(), "Promote")]/..');
|
||||||
await findByXpath('//div[@class="promote-content"]');
|
await findByXpath('//div[@class="promote-content"]');
|
||||||
|
|
Loading…
Reference in a new issue