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

Fix part of #17712 Add more acceptance tests for logged in users #20126

Open
wants to merge 62 commits into
base: develop
Choose a base branch
from

Conversation

agallop
Copy link
Collaborator

@agallop agallop commented Apr 3, 2024

Overview

  1. This PR fixes or fixes part of Acceptance Testing - covering all user journeys in form of user stories #17712
  2. This PR does the following: Adds several acceptance tests for logged-in users:
    • click-all-buttons-on-teach-page
    • click-all-links-on-creator-guidelines-page
    • click-all-links-on-privacy-policy-page
    • click-all-social-icons-in-oppia-footer
    • click-all-links-on-terms-page
    • click-more-links-in-the-oppia-footer
  3. (For bug-fixing PRs only) The original bug occurred because: N/A

Essential Checklist

Please follow the instructions for making a code change.

  • I have linked the issue that this PR fixes in the "Development" section of the sidebar.
  • I have checked the "Files Changed" tab and confirmed that the changes are what I want to make.
  • I have written tests for my code.
  • The PR title starts with "Fix #bugnum: " or "Fix part of #bugnum: ...", followed by a short, clear summary of the changes.
  • I have assigned the correct reviewers to this PR (or will leave a comment with the phrase "@{{reviewer_username}} PTAL" if I can't assign them directly).

Proof that changes are correct

Here are the github action runs for the acceptance tests for this PR which shows that:

  • The github actions are configured correctly.
  • The tests run to completion and do not fail for desktop and mobile.
  • No existing tests have started to fail.

image

Action summary

Proof of changes on desktop with slow/throttled network

N/A

Proof of changes on mobile phone

Action summary

Proof of changes in Arabic language

N/A

PR Pointers

agallop and others added 30 commits March 14, 2024 02:00
Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

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

Thanks @agallop ! I don't really have comments beyond what Christie has :)

*/
async clickLinkToHomePageOnPrivacyPolicyPage(): Promise<void> {
await this.page.waitForXPath(
'//a[contains(text(),"https://www.oppia.org")]'
Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think so -- the policy is only for the oppia.org site.

this.clickOn('https://www.oppia.org'),
]);

expect(this.page.url()).toBe(learnerDashboardUrl);
Copy link
Member

Choose a reason for hiding this comment

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

I think it redirects to the learner dashboard if you are signed in ... are you sure you are signed in?

Copy link

oppiabot bot commented May 11, 2024

Hi @agallop. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks!

Copy link
Collaborator

@imchristie imchristie left a comment

Choose a reason for hiding this comment

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

I commented on the function clickLinkToHomePageOnPrivacyPolicyPage in logged-in-users-utils.ts

this.clickOn('https://www.oppia.org'),
]);

expect(this.page.url()).toBe(learnerDashboardUrl);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I'm sure I signed in and when I clicked the link. It navigates to 'https://www.oppia.org' instead of the learner dashboard.
The redirecting to the learner dashboard only happens if the link is localhost:8181.

@agallop
Copy link
Collaborator Author

agallop commented May 16, 2024

@imchristie @seanlip Please take another look

@agallop agallop assigned seanlip and imchristie and unassigned agallop May 16, 2024
Copy link
Collaborator

@imchristie imchristie left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

oppiabot bot commented May 20, 2024

Unassigning @imchristie since they have already approved the PR.

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

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

Sorry for the late reply -- LGTM for my original comments!

@seanlip
Copy link
Member

seanlip commented May 25, 2024

@agallop There's a test failing for the footer -- could you PTAL?

Failures:
1. Logged-in Users should be able to visit the Oppia Twitter
Message:
Expected '
https://x.com/oppiaorg?mx=2' to contain 'twitter.com'.
Stack:
Error: Expected 'https://x.com/oppiaorg?mx=2' to contain 'twitter.com'.
    at <Jasmine>
    at BaseUser.openSocialLinkInNewTabViaIcon (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/user-utilities/logged-in-users-utils.ts:1334:31)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at BaseUser.clickTwitterIconInFooter (/home/runner/work/oppia/oppi

@seanlip seanlip assigned agallop and unassigned seanlip May 25, 2024
@oppiabot oppiabot bot added the PR: LGTM label May 25, 2024
Copy link

oppiabot bot commented May 25, 2024

Hi @agallop, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to ask someone to merge your PR once the CI checks pass and you're happy with it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants