Skip to content

Commit

Permalink
Updating stats tests. (#300)
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis Li <[email protected]>
  • Loading branch information
Dli3 and Dennis Li authored Mar 27, 2024
1 parent bdd6b13 commit 1ac462f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configs/bacom.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config = {
testDir: '../tests/bacom',
outputDir: '../test-results',
/* Maximum time one test can run for. */
timeout: 30 * 1000,
timeout: 45 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
Expand Down
2 changes: 1 addition & 1 deletion selectors/bacom/stats.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default class Stats {
constructor(page) {
this.page = page;
this.statsLink = page.locator('.stat > div > p > strong > a');
this.solutionsLink = page.locator('.solution > div > p:last-of-type > a');
this.solutionsLink = page.locator('.solution > div > p:nth-child(2) > a');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/bacom/stats.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test.describe('BACOM Stats Block Test Suite', () => {
const stats = new StatsBlock(page);
const testPage = `${baseURL}${features[0].path}`;
await page.goto(testPage);
await page.waitForLoadState('domcontentloaded');
await page.waitForLoadState('networkidle');

await test.step('Selecting a stats link', async () => {
await stats.clickStatsLink();
Expand All @@ -18,7 +18,7 @@ test.describe('BACOM Stats Block Test Suite', () => {

await test.step('Go to test page', async () => {
await page.goto(testPage);
await page.waitForLoadState('domcontentloaded');
await page.waitForLoadState('networkidle');
});

await test.step('Selecting a solutions link', async () => {
Expand Down

0 comments on commit 1ac462f

Please sign in to comment.