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

Update WebStorage to test proper result responses from the host sdk #2463

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexneyman-MSFT
Copy link
Contributor

Description

This PR updates the WebStorage E2E tests to better handle different host SDK versions. We're adding new test cases for webstorage because we have a new flag to test webstorage behavior.

Main changes in the PR:

  1. Updated the WebStorage E2E test configuration in apps/teams-test-app/e2e-test-data/webStorage.json.
  2. Modified the isWebStorageClearedOnUserLogOut function implementation in apps/teams-test-app/src/components/WebStorageAPIs.tsx.

Validation

Validation performed:

  1. Ran the updated E2E tests locally to verify that they pass for different host SDK versions.
  2. Checked that the tests correctly handle the behavior differences between SDK versions before and after 4.0.2.

Unit Tests added:

No new unit tests were added as this change primarily affects E2E tests.

End-to-end tests added:

Yes, the existing E2E tests for WebStorage have been updated and expanded.

Additional Requirements

Change file added:

No

Related PRs:

N/A

Next/remaining steps:

  • Consider adding similar version-specific tests for other modules if needed.
  • Update documentation to reflect these changes in testing strategy, if applicable.

Screenshots:

N/A

@alexneyman-MSFT alexneyman-MSFT requested a review from a team as a code owner August 14, 2024 17:27
"expectedTestAppValue": "webStorage is cleared on user log out"
"expectedTestAppValue": "webStorage is cleared on user log out",
"hostSdkVersion": {
"web": "<4.0.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this PR might need to wait for a little bit since Web Host SDK is releasing and I am not sure which version you should exactly to have here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good, will wait

@AE-MS
Copy link
Contributor

AE-MS commented Aug 15, 2024

"version": ">2.22.0",

I'm not totally sure I understand how this works but does there need to be another restriction on these cases because for the teamsjs version? The behavior of the test app now changes depending on which version of TJS is being used (e.g., the test app from TJS before your change prints a different message). Is this same JSON file used when the tests are run against TJS 2.26? Or does it use the JSON files that were part of 2.26?


Refers to: apps/teams-test-app/e2e-test-data/webStorage.json:4 in 1173e5e. [](commit_id = 1173e5e, deletion_comment = False)

Copy link
Contributor

@AE-MS AE-MS left a comment

Choose a reason for hiding this comment

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

:shipit:

@AE-MS
Copy link
Contributor

AE-MS commented Aug 15, 2024

I approved this but I left an open question that I don't know the answer to and I'm not sure if it should block this getting merged.

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.

3 participants