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

View File

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