Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
VREMSoftwareDevelopment committed Oct 22, 2023
1 parent 97e5817 commit e39ee26
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions react/src/__test__/UsageByMonth.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('UsageByMonth e2e', () => {
TIMEOUT
);

test.skip(
test(
'should sort by month ascending',
async () => {
const selector = '#month-id > span';
Expand All @@ -90,37 +90,6 @@ describe('UsageByMonth e2e', () => {
TIMEOUT
);

test(
'should sort by year descending',
async () => {
const selector = '#month-total > span';
await page.waitForSelector(selector);
await page.click(selector);
const tbodyElements = await page.evaluate(() =>
Array.from(document.querySelectorAll('tbody > tr'), (element) => element.innerText)
);
expect(tbodyElements[0]).toEqual('November\t83.066\t4.263\t87.329\t13.7%\t2.911\t30');
expect(tbodyElements[10]).toEqual('August\t34.516\t2.147\t36.664\t5.7%\t1.183\t31');
},
TIMEOUT
);

test.skip(
'should sort by year ascending',
async () => {
const selector = '#month-total > span';
await page.waitForSelector(selector);
await page.click(selector);
await page.click(selector);
const tbodyElements = await page.evaluate(() =>
Array.from(document.querySelectorAll('tbody > tr'), (element) => element.innerText)
);
expect(tbodyElements[0]).toEqual('August\t34.516\t2.147\t36.664\t5.7%\t1.183\t31');
expect(tbodyElements[10]).toEqual('November\t83.066\t4.263\t87.329\t13.7%\t2.911\t30');
},
TIMEOUT
);

test.skip(
'should show different information when changing year',
async () => {
Expand Down

0 comments on commit e39ee26

Please sign in to comment.