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

Add more tests for the new submission wizard #8346

Closed
10 of 22 tasks
NateWr opened this issue Oct 18, 2022 · 6 comments
Closed
10 of 22 tasks

Add more tests for the new submission wizard #8346

NateWr opened this issue Oct 18, 2022 · 6 comments
Assignees
Labels
Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks.
Milestone

Comments

@NateWr
Copy link
Contributor

NateWr commented Oct 18, 2022

Describe the issue
Due to time constraints, there are several features of the new submission wizard that are not tested as part of the integration tests. The following are tests that would be good to add before 3.4's final release.

High-value Tests

  • I can change the language and section of the submission after I have started the submission. (From the "submitting to X in X language" area.)
  • I can submit in a language other than the current UI. All forms show fields in this language and I'm able to complete my submission without entering details in any other language.
  • When more than one submission language is enabled in Settings > Website > Languages, I can enter title, abstract and keyword information in multiple languages. This appears correctly in the review step.
  • Keywords, subjects and references appear in the form according to the settings in Settings > Workflow > Metadata. When required, I am unable to submit without entering them.
  • I am unable to complete my submission if I have forgotten to select a file type after uploading a file in the first step.
  • I am unable to complete my submission if i have forgotten to enter a title.
  • I am unable to complete my submission if I am submitting to a section that requires abstracts and I have not entered an abstract. I am allowed to complete my submission if the section does not require abstracts.
  • I am unable to complete my submission if I enter an abstract that is longer than the section allows.
  • When a copyright notice is configured in the context, it appears in the review step of the submission wizard and I am unable to submit without checking its checkbox.
  • When I enter comments to the editor, a discussion with these comments is created once the submission is submitted.
  • As an author, I am unable to submit to a section when it is marked inactive or when it is configured so that only editors can submit to it.
  • When I am logged in as a user with editor and author roles, I am able to choose which role to create a submission as when starting a submission. When I choose to submit as an editor, no author record is created automatically in the submission.
  • When a journal has only one section and language, I am not asked to select these when starting a submission. The text "submitting to X in X language" does not appear at the top of the wizard. Forms do not have any multilingual input. And I am still able to complete my submission.
  • When I make a submission, editorial assignments configured for sections and categories are applied correctly.

Other tests

  • The back buttons work on every step.
  • On the review step, I can click the Edit button by any review panel to go to that step.
  • Categories appear correctly in the submission wizard. When I select a category, it appears in the review step.
  • I can go to any previous step by clicking the step name in the list of steps at the top.
  • All metadata settings are tested (see test above about keywords, subjects, and references).
  • If no privacy statement has been entered, this doesn't appear on the form to start a submission.
  • I can start a submission even if I don't have the author role (eg - as reviewer, copyeditor, etc.) After I have created a submission, I have the author role.
  • If there is no author role, or the author role does not allow self-registration, I can not start a submission when I am logged in as a reviewer or copyeditor.

Additional Comments
I'm assigning this to 3.4 in the hope that we can get some of these tests implemented before the final release. But I suspect we'll bump most of them.

@NateWr NateWr added the Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks. label Oct 18, 2022
@NateWr NateWr added this to the 3.4 milestone Oct 18, 2022
@NateWr NateWr moved this to Backlog in Infrastructure Oct 18, 2022
@NateWr NateWr modified the milestones: 3.4, 3.4.x Feb 15, 2023
@NateWr NateWr moved this from Backlog to Under Development in Infrastructure Apr 3, 2023
@NateWr NateWr self-assigned this Apr 3, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 3, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 3, 2023
- Tests comments for the editor
- Tests submission language different from UI locale
NateWr added a commit to NateWr/ojs that referenced this issue Apr 4, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 4, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 4, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 5, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 5, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 5, 2023
- Tests comments for the editor
- Tests submission language different from UI locale
NateWr added a commit to NateWr/ojs that referenced this issue Apr 5, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 5, 2023
@NateWr
Copy link
Contributor Author

NateWr commented Apr 5, 2023

The following PRs add several of the high-value tests listed above, but not all of them.

PRs:
#8876
pkp/ojs#3866

NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 10, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 10, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 10, 2023
- Tests comments for the editor
- Tests submission language different from UI locale
NateWr added a commit to NateWr/ojs that referenced this issue Apr 10, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 10, 2023
asmecher pushed a commit to asmecher/pkp-lib that referenced this issue Apr 21, 2023
asmecher pushed a commit to asmecher/ojs that referenced this issue Apr 21, 2023
- Tests comments for the editor
- Tests submission language different from UI locale
asmecher pushed a commit to asmecher/ojs that referenced this issue Apr 21, 2023
asmecher pushed a commit to asmecher/ojs that referenced this issue Apr 21, 2023
asmecher pushed a commit to asmecher/ojs that referenced this issue Apr 21, 2023
asmecher pushed a commit to asmecher/ojs that referenced this issue Apr 21, 2023
@asmecher
Copy link
Member

@NateWr, looking at the screenshot from https://app.travis-ci.com/github/pkp/ojs/jobs/600315309, it looks like the French language option isn't being found at all in the user navigation menu. The error get .app__userNav a:contains('Français') is failing to find the element, so the language switcher isn't submitting the request to change the language.
image

NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 24, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 24, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 24, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 24, 2023
NateWr added a commit to NateWr/pkp-lib that referenced this issue Apr 24, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 24, 2023
- Tests comments for the editor
- Tests submission language different from UI locale
NateWr added a commit to NateWr/ojs that referenced this issue Apr 24, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 24, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 24, 2023
NateWr added a commit to NateWr/ojs that referenced this issue Apr 24, 2023
NateWr added a commit that referenced this issue Apr 24, 2023
#8346 Add tests for the submission wizard
NateWr added a commit to pkp/ojs that referenced this issue Apr 24, 2023
@NateWr
Copy link
Contributor Author

NateWr commented Apr 24, 2023

Thanks @asmecher, that helped! I was able to find a test that disables the UI language. I went ahead and re-enabled it in that test to "reset" the data: https://github.com/pkp/pkp-lib/pull/8876/files#diff-33549da02ff3ea0d4410934cdb3f9f063321bf8849a132890471bb4902bab43fR31-R36

Oddly, our test data at pkp/datasets doesn't seem to include this setting. I thought the test data was saved after all the tests finished. But is the test data maybe saved before some of the integration tests are finished?

@NateWr NateWr closed this as completed Apr 24, 2023
@github-project-automation github-project-automation bot moved this from Under Development to Done in Infrastructure Apr 24, 2023
@asmecher
Copy link
Member

👍👍 The datasets are saved after the data build tests, but before the integration tests.

@NateWr
Copy link
Contributor Author

NateWr commented Apr 24, 2023

In that case, it might be good to encourage integration tests to "reset" any conditions that have been modified as part of the tests. If side effects can be isolated then it's easier to debug a single test without having to run the full suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:2:Moderate A new feature or improvement that can be implemented in less than 4 weeks.
Projects
Status: Done
Development

No branches or pull requests

3 participants