Unverified Commit 472a5fa6 authored by Eric Rosenbaum's avatar Eric Rosenbaum Committed by GitHub

Merge pull request #6007 from BryceLTaylor/studio-transfer-tests

Add studio transfer test
parents 2ee1c252 e0778424
...@@ -147,4 +147,47 @@ describe('studio management', () => { ...@@ -147,4 +147,47 @@ describe('studio management', () => {
let promoteSuccessVisible = await promoteSuccess.isDisplayed(); let promoteSuccessVisible = await promoteSuccess.isDisplayed();
await expect(promoteSuccessVisible).toBe(true); await expect(promoteSuccessVisible).toBe(true);
}); });
test('transfer studio host', async () => {
// sign in as user2
await signIn(username2, password, driver);
await findByXpath('//span[contains(@class, "profile-name")]');
// for some reason the user isn't showing up without reloading the page
await driver.get(curatorTab);
// open kebab menu
let user2href = '/users/' + username2;
// click kebab menu on the user tile
let kebabMenuXpath = `//a[@href = "${user2href}"]/` +
'following-sibling::div[@class="overflow-menu-container"]';
await clickXpath(kebabMenuXpath + '/button[@class="overflow-menu-trigger"]');
// click transfer in dropdown
await clickXpath('//button[@class="studio-member-tile-menu-wide"]');
await findByXpath('//div[contains(@class, "transfer-info-title")]');
// click next button
await clickXpath('//button[contains(@class, "next-button")]');
await findByXpath('//div[@class="transfer-selection-heading"]');
// click user tile
await clickXpath(`//div[contains(text(), "${username3}")]`);
await findByXpath('//div[contains(@class, "transfer-host-name-selected")]');
// click next button
await clickXpath('//button[contains(@class, "next-button")]');
await findByXpath('//div[@class="transfer-outcome"]');
// enter password
let passwordInput = await findByXpath('//input[@class="transfer-password-input"]');
await passwordInput.sendKeys(password);
await findByXpath(`//input[@value="${password}"]`);
// click confirm
// await clickXpath('//button[contains(@class, "confirm-transfer-button")]')
await clickXpath('//span[contains(text(), "Confirm")]/..');
let transferSuccess = await findByXpath('//div[contains(@class, "alert-success")]');
let successVisible = await transferSuccess.isDisplayed();
await expect(successVisible).toBe(true);
});
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment