-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 curriculum admin topic management acceptance tests #19914
Fix part of #17712: Add curriculum admin topic management acceptance tests #19914
Conversation
…-topic-management-acceptance-test
…-topic-management-acceptance-test
Hi @Vir-8, can you complete the following:
|
Hi @Vir-8 please assign the required reviewer(s) for this PR. Thanks! |
…-topic-management-acceptance-test
…-topic-management-acceptance-test
…-topic-management-acceptance-test
@seanlip I've addressed all your comments and really hope it's better, I'm aware that it's failing on CI but I'm unable to reproduce the error manually and have made a debugging doc at #20184 regarding the same. I don't see any problems in the code, PTAL meanwhile as the issue might cause extended delays. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have barely any concerns with the code, it looks good in general. Thanks! Please fix the minor nits and feel free to get this submitted.
Sorry to hear about the failing test though. In general it would be great to have screenshot functionality so we can take a screenshot at the failure point in GitHub Actions....or a video perhaps. Maybe one thing you can do is to try doing other actions on the page to get a sense of what's there and what's not -- basically try to log as much info as you can about the page to tell you something about its structure at the point the test fails.
'Test Subtopic 1', | ||
'Test Topic 1' | ||
); | ||
await curriculumAdmin.addSkillToDiagnostingTestsOfTopic( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addSkillToDiagnosticTest(....)
(note: there is 1 diagnostic test for the math classroom, and it covers all topics)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
explorationId, | ||
'Test Topic 1' | ||
); | ||
await curriculumAdmin.expectTopicToBePublishedInTopicAndSkillsDashboard( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's TopicsAndSkillsDashboard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
export class CurriculumAdmin extends BaseUser { | ||
/** | ||
* Function for navigating to the topic and skills dashboard page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can omit "Function for ...", "Function to ..." -- try to document these similar to what we do in Python, start the docstrings with a simple verb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Hi @Vir-8, 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! |
…-topic-management-acceptance-test
…-topic-management-acceptance-test
@seanlip The CI error has been fixed with a simple await, feel free to add this PR to the merge queue |
/** | ||
* Navigate to the creator dashboard page. | ||
*/ | ||
async navigateToCreatorDashboardPage(): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we duplicating code here? Thought this was apart of exploration editor utils already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/** | ||
* Create an exploration as a curriculum admin. | ||
*/ | ||
async createAndPublishExploration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, I would expect this to be in the exploration editor utils, unless I'm missing some context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're testing the curriculum admin role here though - not the exploration editor. Curriculum admins can also create and publish explorations. Ditto above, seems to be recently pushed code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to clarify AFAIK we are trying to separate user behaviors. Yes a curriculum admin can create and publish explorations but so can every user, we wouldn't want to duplicate this for every user role. We use composition which allows a user to have multiple classes. ATM the exploration editor class is composed by default so any function you put in there can be ran by any created user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless this function has something specific to the curriculum admin role we should separate it into the exploration editor class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, thanks for explaining, so are you suggesting to create a separate exploration editor user in the spec to deal with exploration creation if I'm not misunderstanding? I didn't quite get what you meant by a user having multiple classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it's fine to have one user just move these functions over to the other file and concat the types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E.g. when we you declare curriculumAdmin: CurriculumAdmin & ExplorationEditor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM.
Hi @Vir-8, 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! |
…ance tests (oppia#19914) * Create acceptance test files and implement functionality to add skills * Add functionality to create questions * Add functionality to create explorations * Add thumbnail image and topic creation functionality * Add functionality to create subtopics, stories, chapters, and publish stories * Write the acceptance tests to create topics, stories, chapters, and publish stories * Migrate curriculum admin tests to TypeScript * Add comments and fix tests * Merge remote-tracking branch 'upstream/develop' into curriculum-admin-topic-management-acceptance-test * Fix linting issues * Fix utility functions * Fix tests by adding timeouts for improved stability * Clean code * Fix typescript issues and set the main page to the active tab * Change comments for clarity * Add expectation tests * Fix linting issues * Improve extracting exploration ID and handle exceptions * Correct wordings and input texts * Remove redundant wait and make question creation functionality independent of user flow * Add comments explaining timeouts and generalize functionality for timeout event * Fix opening skill editor before question creation * Refactor story creation to combine functions following user flow * Modify functionalities to use objects for user input information * Fix handling necessary question creation * Complete topic creation functionality including publishing topic * Appropriately publish topics, update expectance test and replace timeouts * Add comments for clarity * Move helper function to spec file * Clean code and add comments * Fix linting issues * Minimize flaky behaviour appropriately * Clean code * Modify tests to emulate mobile user behaviour * Adjust utility to publish topics for mobile functionality * Remove test timeouts * Improve saving topic draft flow * Fix new tab flake and finalize mobile utility functions * Move exploration ID extraction function to base user utility service * Remove objects and pass data as explicit arguments * Fix linting issues * Address comments and improve clarity * Improve user utility functionality * Reduce flakiness and improve naming * Fix linter issues * Fix flake and improve naming * Fix typos and improve comments * Fix merge issues and update suite * Attempt to fix CI error * Create explorations from exploration editor utils to avoid code duplication * Remove unused variables
Overview
Essential Checklist
Proof that changes are correct
PR Pointers