Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve UI tests for API modules #36187

Closed
wants to merge 1 commit into from

Conversation

jolelievre
Copy link
Contributor

@jolelievre jolelievre commented May 17, 2024

Questions Answers
Branch? develop
Description? UI tests for API module, optimize the listing a little, stabilize the toggle that needs to wait a bit longer
Type? improvement
Category? TE
BC breaks? no
Deprecations? no
How to test? CI and UI tests green
UI Tests Single campaign for API: https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/9130326988
Full campaign: https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/9130335672
Fixed issue or discussion? ~
Related PRs ~
Sponsor company ~

@jolelievre jolelievre requested a review from a team as a code owner May 17, 2024 13:14
@prestonBot prestonBot added develop Branch Improvement Type: Improvement labels May 17, 2024
@jolelievre jolelievre changed the title Improve UI tests for API module, optimize the listing a little, stabilize the… Improve UI tests for API modules May 17, 2024
… toggle that needs to wait a bit longer and force using specific modules
Comment on lines +150 to +151
let isModuleVisible = await moduleManager.searchModule(page, {tag: 'statscarrier'} as FakerModule);
expect(isModuleVisible).to.be.equal(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let isModuleVisible = await moduleManager.searchModule(page, {tag: 'statscarrier'} as FakerModule);
expect(isModuleVisible).to.be.equal(true);
const isModule1Visible = await moduleManager.searchModule(page, {tag: 'statscarrier'} as FakerModule);
expect(isModule1Visible).to.be.equal(true);

Comment on lines +154 to +155
isModuleVisible = await moduleManager.searchModule(page, {tag: 'pagesnotfound'} as FakerModule);
expect(isModuleVisible).to.be.equal(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
isModuleVisible = await moduleManager.searchModule(page, {tag: 'pagesnotfound'} as FakerModule);
expect(isModuleVisible).to.be.equal(true);
const isModule2Visible = await moduleManager.searchModule(page, {tag: 'pagesnotfound'} as FakerModule);
expect(isModule2Visible).to.be.equal(true);

await testContext.addContextItem(this, 'testIdentifier', `checkModules${index}`, baseContext);

await dashboardPage.goToSubMenu(page, dashboardPage.modulesParentLink, dashboardPage.modulesParentLink);
// Extra wait for this one because the cache has been cleared by the previous API call
await dashboardPage.goToSubMenu(page, dashboardPage.modulesParentLink, dashboardPage.modulesParentLink, 60000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always need to do that ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the cache is cleared after the API call I think it's safer to wait a bit longer, the first page is really long to load

@jolelievre jolelievre closed this May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
develop Branch Improvement Type: Improvement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants