Fix tests

This commit is contained in:
Nathan Bierema 2023-12-11 21:35:03 -05:00
parent c684a46cbc
commit a07b829b50
2 changed files with 5 additions and 9 deletions

View File

@ -40,16 +40,14 @@ describe('Chrome extension', function () {
it("should contain inspector monitor's component", async () => { it("should contain inspector monitor's component", async () => {
await delay(1000); await delay(1000);
const val = await driver const val = await driver
.findElement(webdriver.By.xpath('//div[contains(@class, "inspector-")]')) .findElement(webdriver.By.xpath('//div[@data-testid="inspector"]'))
.getText(); .getText();
expect(val).toBeDefined(); expect(val).toBeDefined();
}); });
it('should contain an empty actions list', async () => { it('should contain an empty actions list', async () => {
const val = await driver const val = await driver
.findElement( .findElement(webdriver.By.xpath('//div[@data-testid="actionListRows"]'))
webdriver.By.xpath('//div[contains(@class, "actionListRows-")]'),
)
.getText(); .getText();
expect(val).toBe(''); expect(val).toBe('');
}); });
@ -72,9 +70,7 @@ describe('Chrome extension', function () {
const result = await driver.wait( const result = await driver.wait(
driver driver
.findElement( .findElement(webdriver.By.xpath('//div[@data-testid="actionListRows"]'))
webdriver.By.xpath('//div[contains(@class, "actionListRows-")]'),
)
.getText() .getText()
.then((val) => { .then((val) => {
return actionsPattern.test(val); return actionsPattern.test(val);

View File

@ -89,7 +89,7 @@ describe('DevTools panel for Electron', function () {
it('should contain INIT action', async () => { it('should contain INIT action', async () => {
const element = await driver.wait( const element = await driver.wait(
webdriver.until.elementLocated( webdriver.until.elementLocated(
webdriver.By.xpath('//div[contains(@class, "actionListRows-")]'), webdriver.By.xpath('//div[@data-testid="actionListRows"]'),
), ),
5000, 5000,
'Element not found', 'Element not found',
@ -100,7 +100,7 @@ describe('DevTools panel for Electron', function () {
it("should contain Inspector monitor's component", async () => { it("should contain Inspector monitor's component", async () => {
const val = await driver const val = await driver
.findElement(webdriver.By.xpath('//div[contains(@class, "inspector-")]')) .findElement(webdriver.By.xpath('//div[@data-testid="inspector"]'))
.getText(); .getText();
expect(val).toBeDefined(); expect(val).toBeDefined();
}); });