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: Acceptance test for logged-in learner #20043

Conversation

AFZL210
Copy link
Member

@AFZL210 AFZL210 commented Mar 24, 2024

Overview

  1. This PR fixes part of Acceptance Testing - covering all user journeys in form of user stories #17712 .
  2. This PR does the following: Acceptance test for a logged-in user(here) can add an exploration from the community library to 'Play later,' remove it from the learner dashboard, search and play the exploration, give feedback, and report it.

Essential Checklist

  • The PR title starts with "Fix #bugnum: " or "Fix part of #bugnum: ...", followed by a short, clear summary of the changes.
  • I have followed the instructions for making a code change.
  • I have assigned the correct reviewers to this PR (or will leave a comment with the phrase "@{{reviewer_username}} PTAL" if I don't have permissions to assign reviewers directly).
  • The linter/Karma presubmit checks pass on my local machine, and my PR follows the coding style guide).
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)

Proof that changes are correct

Running suite with 1 specs.

------------------------------------
| 1. Suite started: Logged-in User |
------------------------------------
[2024-03-24 20:33:54 +0530] [147698] [INFO] Starting gunicorn 20.1.0
[2024-03-24 20:33:54 +0530] [147698] [INFO] Listening at: http://0.0.0.0:24999 (147698)
[2024-03-24 20:33:54 +0530] [147698] [INFO] Using worker: sync
[2024-03-24 20:33:54 +0530] [147747] [INFO] Booting worker with pid: 147747
[2024-03-24 20:33:54 +0530] [147749] [INFO] Starting gunicorn 20.1.0
[2024-03-24 20:33:54 +0530] [147749] [INFO] Listening at: http://0.0.0.0:24998 (147749)
[2024-03-24 20:33:54 +0530] [147749] [INFO] Using worker: sync
[2024-03-24 20:33:54 +0530] [147752] [INFO] Booting worker with pid: 147752
[datastore] Mar 24, 2024 8:33:55 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
[datastore] INFO: Adding handler(s) to newly registered Channel.
[datastore] Mar 24, 2024 8:33:55 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[datastore] INFO: Detected HTTP/2 connection.
[datastore] Mar 24, 2024 8:33:55 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
[datastore] INFO: Adding handler(s) to newly registered Channel.
[datastore] Mar 24, 2024 8:33:55 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[datastore] INFO: Detected HTTP/2 connection.
[2024-03-24 20:33:57 +0530] [147845] [INFO] Starting gunicorn 20.1.0
[2024-03-24 20:33:57 +0530] [147845] [INFO] Listening at: http://0.0.0.0:24997 (147845)
[2024-03-24 20:33:57 +0530] [147845] [INFO] Using worker: sync
[2024-03-24 20:33:57 +0530] [147859] [INFO] Booting worker with pid: 147859
[2024-03-24 20:34:02 +0530] [148003] [INFO] Starting gunicorn 20.1.0
[2024-03-24 20:34:02 +0530] [148003] [INFO] Listening at: http://0.0.0.0:24996 (148003)
[2024-03-24 20:34:02 +0530] [148003] [INFO] Using worker: sync
[2024-03-24 20:34:02 +0530] [148006] [INFO] Booting worker with pid: 148006
[datastore] Mar 24, 2024 8:34:02 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
[datastore] INFO: Adding handler(s) to newly registered Channel.
[datastore] Mar 24, 2024 8:34:02 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[datastore] INFO: Detected HTTP/2 connection.
[datastore] Mar 24, 2024 8:34:06 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
[datastore] INFO: Adding handler(s) to newly registered Channel.
[datastore] Mar 24, 2024 8:34:06 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[datastore] INFO: Detected HTTP/2 connection.
[2024-03-24 20:34:32 +0530] [148513] [INFO] Starting gunicorn 20.1.0
[2024-03-24 20:34:32 +0530] [148513] [INFO] Listening at: http://0.0.0.0:24995 (148513)
[2024-03-24 20:34:32 +0530] [148513] [INFO] Using worker: sync
[2024-03-24 20:34:32 +0530] [148519] [INFO] Booting worker with pid: 148519
[2024-03-24 20:34:34 +0530] [148596] [INFO] Starting gunicorn 20.1.0
[2024-03-24 20:34:34 +0530] [148596] [INFO] Listening at: http://0.0.0.0:24994 (148596)
[2024-03-24 20:34:34 +0530] [148596] [INFO] Using worker: sync
[2024-03-24 20:34:34 +0530] [148599] [INFO] Booting worker with pid: 148599
[datastore] Mar 24, 2024 8:34:34 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
[datastore] INFO: Adding handler(s) to newly registered Channel.
[datastore] Mar 24, 2024 8:34:34 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[datastore] INFO: Detected HTTP/2 connection.
/tmp/tmpgXaNdC/lib/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
  warnings.warn(message, category=ElasticsearchWarning)
ERROR:root:This app cannot send emails to users.

Spec started : Logged-in User should add exploration to play later then remove it and report it
LOG: Exploration with title Test Exploration exists in Play Later
LOG: Removed exploration from play later
LOG: Exploration with title Test Exploration does not exists in Play Later
[datastore] Mar 24, 2024 8:34:58 PM io.gapi.emulators.grpc.GrpcServer$3 operationComplete
[datastore] INFO: Adding handler(s) to newly registered Channel.
[datastore] Mar 24, 2024 8:34:58 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[datastore] INFO: Detected HTTP/2 connection.
LOG: Exploration completed successfully!
[2024-03-24 20:34:59 +0530] [149626] [INFO] Starting gunicorn 20.1.0
[2024-03-24 20:34:59 +0530] [149626] [INFO] Listening at: http://0.0.0.0:24993 (149626)
[2024-03-24 20:34:59 +0530] [149626] [INFO] Using worker: sync
[2024-03-24 20:34:59 +0530] [149629] [INFO] Booting worker with pid: 149629
ERROR:root:This app cannot send emails to users.
LOG: Exploration reported with message Testing the functionality.
LOG: Feedback has been given with the message: Testing Feedback functionality
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
ERROR:root:Frontend error: 
Failed to execute 'convertToSpecifiedUnits' on 'SVGLength': Could not resolve relative length.

    at URL: http://localhost:8181/create/T80dvnaC21u1#/feedback
LOG: 1 feedback from testLearner is present.
-> Passed [ Took 29.647 seconds ]

Screenshot from 2024-03-24 20-36-01

References:

Proof of changes in Arabic language

PR Pointers

@AFZL210 AFZL210 requested review from a team as code owners March 24, 2024 15:20
@AFZL210 AFZL210 marked this pull request as draft March 24, 2024 15:20
Copy link

oppiabot bot commented Mar 24, 2024

Assigning @StephenYu2018 for the first pass review of this PR. Thanks!

@AFZL210 AFZL210 marked this pull request as ready for review March 24, 2024 15:25
Copy link

oppiabot bot commented Mar 24, 2024

Hi @AFZL210. 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!

@DubeySandeep
Copy link
Member

DubeySandeep commented Mar 27, 2024

@StephenYu2018 Can you please take a pass on this PR?

Copy link
Contributor

@StephenYu2018 StephenYu2018 left a comment

Choose a reason for hiding this comment

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

3 concerns to address before merging.

Copy link

oppiabot bot commented Mar 28, 2024

Unassigning @StephenYu2018 since the review is done.

@Ash-2k3 Ash-2k3 assigned DubeySandeep and unassigned AFZL210 Apr 10, 2024
@jnvtnguyen
Copy link
Contributor

jnvtnguyen commented Apr 10, 2024

@AFZL210 Add the console error as a regex to match it inside puppeteer-testing-utilities/console-reporter.ts under CONSOLE_ERRORS_TO_FIX with a TODO pointing to the existing issue or create a new issue if there isn't one filed.

@jnvtnguyen jnvtnguyen assigned AFZL210 and unassigned DubeySandeep Apr 10, 2024
@@ -318,6 +318,7 @@ jobs:
- logged-in-user-tests/click-all-buttons-on-navbar
- logged-in-user-tests/click-all-links-in-about-oppia-footer
- logged-in-user-tests/click-all-links-on-get-started-page
- logged-in-user-tests/try-to-add-exploration-to-play-latee-give-feedback-and-report-it
Copy link
Member

Choose a reason for hiding this comment

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

later is misspelled

@@ -32,6 +32,7 @@ export default {
Contact: 'http://localhost:8181/contact',
ContributorDashboardAdmin:
'http://localhost:8181/contributor-admin-dashboard',
LearnerDashboard: 'http://localhost:8181/learner-dashboard',
Copy link
Member

Choose a reason for hiding this comment

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

Keep this list in alphabetical order.

'exploration_creator@example.com'
);

await explorationCreator.createEndExploration();
Copy link
Member

Choose a reason for hiding this comment

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

What does this mean? I don't think it makes sense.

'Test Exploration'
);
await testLearner.expectReachedTheEndOfExploration();
await testLearner.reportTheExploration('Testing the functionality');
Copy link
Member

Choose a reason for hiding this comment

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

reportExploration

'Testing Feedback functionality'
);

await explorationCreator.openExplorationEditor('Test Exploration');
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a more specific method name. Why we are giving input as 'Test Exploration' in openExplorationEditor?
Can we have something like openExplorationWithTitle('test Exploration')

Copy link
Contributor

@rahat2134 rahat2134 left a comment

Choose a reason for hiding this comment

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

Reviewed top level tests and utils. PTAL.

'exploration_creator@example.com'
);

await explorationCreator.createEndExploration();
Copy link
Contributor

Choose a reason for hiding this comment

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

We can have something like createExplorationWithMinimumInteraction...

}, DEFAULT_SPEC_TIMEOUT);

it(
'should add exploration to play later then remove it then give feedback and report it',
Copy link
Contributor

Choose a reason for hiding this comment

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

should add exploration to play later, remove it, give feedback, and finally report it.

'should add exploration to play later then remove it then give feedback and report it',
async function () {
await testLearner.navigateToCommunityLibraryPage();
await testLearner.findExplorationInCommunityLibrary('Test Exploration');
Copy link
Contributor

Choose a reason for hiding this comment

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

findExplorationInCommunityLibraryWithTitle('Test Exploration');


await testLearner.navigateToLearnerDashboardPage();
await testLearner.openCommunityLessonsTab();
await testLearner.expectExplorationWithTitleToBePresentInPlayLater(
Copy link
Contributor

Choose a reason for hiding this comment

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

expectExplorationToBePresentInPlayLaterWithTitle('test Exploration');

'Test Exploration'
);
await testLearner.removeExplorationFromPlayLater();
await testLearner.expectExplorationWithTitleToBeAbsentInPlayLater(
Copy link
Contributor

Choose a reason for hiding this comment

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

See above comment.


/**
* This function to add exploration to play later.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove it.


/**
* This function to remove exploration from play later.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

This also.

*/
async addExplorationToPlayLater(): Promise<void> {
await this.page.hover(communityExplorationCard);
await this.page.click('.e2e-test-add-to-playlist-btn');
Copy link
Contributor

Choose a reason for hiding this comment

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

dont use direct selector, this.clickOn();

await this.navigateToCreatorDashboardPage();
}

const allExplorations = await this.page.$$('.oppia-activity-summary-tile');
Copy link
Contributor

Choose a reason for hiding this comment

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

explorationsList

await this.clickOn(createExplorationButton);
await this.page.waitForSelector(
`${dismissWelcomeModalSelector}:not([disabled])`
);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it is required here. Please check.

@rahat2134
Copy link
Contributor

Tests are failing at CLI, I think some waitFor need to be corrected.

@AFZL210
Copy link
Member Author

AFZL210 commented Apr 17, 2024

Tests are failing at CLI, I think some waitFor need to be corrected.

It's because of the mobile test. I'm moving this PR to draft, as the mobile test can only be implemented after this issue is fixed.

@AFZL210 AFZL210 marked this pull request as draft April 17, 2024 06:56
Copy link

oppiabot bot commented Apr 24, 2024

Hi @AFZL210, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 4 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale label Apr 24, 2024
@seanlip
Copy link
Member

seanlip commented Apr 24, 2024

Tests are failing at CLI, I think some waitFor need to be corrected.

It's because of the mobile test. I'm moving this PR to draft, as the mobile test can only be implemented after this issue is fixed.

@AFZL210 We can't have this PR be open but blocked long-term. Are you planning to help address the issue with #19443?

@oppiabot oppiabot bot removed the stale label Apr 24, 2024
@AFZL210
Copy link
Member Author

AFZL210 commented Apr 24, 2024

Tests are failing at CLI, I think some waitFor need to be corrected.

It's because of the mobile test. I'm moving this PR to draft, as the mobile test can only be implemented after this issue is fixed.

@AFZL210 We can't have this PR be open but blocked long-term. Are you planning to help address the issue with #19443?

Make sense, Yes just confirmed with harsh he still haven't got the solution, I will try to reproduce the issue today and try to find the fix.

Copy link

oppiabot bot commented May 1, 2024

Hi @AFZL210, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 4 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale label May 1, 2024
@oppiabot oppiabot bot removed the stale label May 1, 2024
Copy link

oppiabot bot commented May 8, 2024

Hi @AFZL210, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 4 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 4 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

Copy link

oppiabot bot commented May 11, 2024

Hi @AFZL210. 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!

@oppiabot oppiabot bot closed this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants