Files

23 lines
1.1 KiB
TypeScript

import { getBaseUrl, appendFlagsToUrl } from '../../test-helpers';
import { getTestDao } from '../../../config/test-daos';
import { BaseSeleniumTest } from '../../base-selenium-test';
import { By } from 'selenium-webdriver';
import { pages } from '../../../config/pages';
const test = new BaseSeleniumTest('settings', 'modules-tab');
BaseSeleniumTest.run(async (test) => {
// Load the DAO homepage
await test.start();
const daoHomePath = `${pages['dao-homepage']}?dao=${getTestDao('multisig').value}`;
await test.driver!.get(appendFlagsToUrl(getBaseUrl() + daoHomePath));
// Click the 'Manage DAO' button
const manageBtn = await test.waitForElement(By.css('[aria-label="Manage DAO"]'));
await manageBtn.click();
// Click on the 'Modules and Guards' tab
const modulesTab = await test.waitForElement(By.xpath("//p[text()='Modules and Guards']"));
await modulesTab.click();
// Wait for the 'Modules' paragraph (exact text match)
await test.waitForElement(By.xpath("//p[text()='Modules']"));
console.log('Modules and Guards tab opened and "Modules" paragraph found.');
}, test);