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

MWPW-147876 Improve SharePoint editing #349

Merged
merged 2 commits into from
May 22, 2024
Merged

MWPW-147876 Improve SharePoint editing #349

merged 2 commits into from
May 22, 2024

Conversation

Brandon32
Copy link
Contributor

  • Add browser context for headless runs, login once with headed.
  • Fetch admin api instead of navigating to save time.
  • Check that document loads successfully and output any errors.
  • Navigate to first non-table section to be able to add page break, checks for page break.
  • Soft fail if document doesn't save, undo edit step.
  • Tuning timeouts: 1s for toPass loops, 30s for long tasks, 2 min timeout for each test. (Most pages finish in under 20s.)

Resolves: MWPW-147876

*/
async getDialogText() {
if (await this.dialogText.isVisible()) {
return this.dialogText.textContent();
Copy link
Contributor

Choose a reason for hiding this comment

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

you need await for this

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean for textContent()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ESLint will complain of redundant use of await on a return. (https://eslint.org/docs/rules/no-return-await)
I can change it to this:

Suggested change
return this.dialogText.textContent();
const dialogText = await this.dialogText.textContent();
return dialogText;

@Brandon32 Brandon32 merged commit 589f3c1 into main May 22, 2024
5 checks passed
@Brandon32 Brandon32 deleted the bmarshal/sp-editing branch May 22, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants