Commit 1ec30589 authored by BryceLTaylor's avatar BryceLTaylor

move studio creation for management integration tests to beforeAll

parent 2e5055e0
......@@ -24,6 +24,7 @@ let username3 = process.env.SMOKE_USERNAME + '3';
let password = process.env.SMOKE_PASSWORD;
let promoteStudioURL;
let curatorTab;
if (remote){
jest.setTimeout(70000);
......@@ -72,30 +73,34 @@ describe('studio page while signed out', () => {
describe('studio management', () => {
beforeAll(async () => {
// expect(projectUrl).toBe(defined);
driver = await buildDriver('www-integration studio-page signed out');
driver = await buildDriver('www-integration studio management');
await driver.get(rootUrl);
// create a studio for tests
await signIn(username2, password, driver);
await findByXpath('//span[contains(@class, "profile-name")]');
await driver.get(rateLimitCheck);
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
await findByXpath('//div[@class="studio-tabs"]');
promoteStudioURL = await driver.getCurrentUrl();
curatorTab = await promoteStudioURL + 'curators';
});
beforeEach(async () => {
await clickXpath('//a[contains(@class, "user-info")]');
await clickText('Sign out');
await driver.get(curatorTab);
await driver.sleep(1000);
});
afterAll(async () => await driver.quit());
test('promote to manager', async () => {
// sign in as user2
await driver.get(rootUrl);
await driver.sleep(1000);
await signIn(username2, password, driver);
await findByXpath('//span[contains(@class, "profile-name")]');
// Create a studio
await driver.get(rateLimitCheck);
await driver.get(myStuffURL);
await clickXpath('//form[@id="new_studio"]/button[@type="submit"]');
await findByXpath('//div[@class="studio-tabs"]');
promoteStudioURL = await driver.getCurrentUrl();
let curatorTab = await promoteStudioURL + 'curators';
// invite user3 to curate
await driver.get(curatorTab);
let inviteBox = await findByXpath('//div[@class="studio-adder-row"]/input');
......
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