Skip to content

Commit

Permalink
release-2.25.10 live (#1868)
Browse files Browse the repository at this point in the history
* Apply translations in ko

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'ko' language.

* Apply translations in ko

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'ko' language.

* Apply translations in ko

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'ko' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'zh_CN' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'zh_CN' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'zh_CN' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'zh_TW' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'zh_TW' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'zh_TW' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'fr' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'fr' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'fr' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'ar' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'ar' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'ar' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'ru' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'ru' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'ru' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'es' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'es' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'es' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'it' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'it' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'it' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'pt' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'pt' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'pt' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'cs' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'cs' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'cs' language.

* Apply translations in ja

translation completed for the source file '/src/locale/properties/authorize/authorize.en.properties'
on the 'ja' language.

* Apply translations in ja

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'ja' language.

* Apply translations in ja

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'ja' language.

* tx pull -f

* 🤖 GITHUB ACTIONS

* tx pull -f

* remove end of line character

* 🤖 GITHUB ACTIONS

* style: Fix placeholder typo in modal biography (#1831)

* style: Fix placeholder typo in modal biography

* 🤖 GITHUB ACTIONS

* Fix/8386 modal structure markup 3 (#1832)

* fix: Remove unused variables

* fix: Update `getAriaLabel` signature method and add missing case

* style: Fix template mismatch property

* fix other name aria label (#1833)

* add/put/delete peer review inbox notifications (#1834)

* add/put/delete peer review inbox notifications

* 🤖 GITHUB ACTIONS

* fix: Sort countries alphabetically in select tags (#1835)

* fix: Sort countries alphabetically in select tags

* 🤖 GITHUB ACTIONS

* fix: Add missing `aria-label` for bibtex modal (#1836)

* fix: Add missing `aria-label` for bibtex modal

* 🤖 GITHUB ACTIONS

* Stats link should go to the info site (#1837)

* Stats link should go to the info site

* 🤖 GITHUB ACTIONS

* Add missing attributes

* 🤖 GITHUB ACTIONS

* Additional fixes for accessibility around stacks expand/collapse and … (#1838)

* Additional fixes for accessibility around stacks expand/collapse and is this you

* 🤖 GITHUB ACTIONS

Co-authored-by: Angel Montenegro <[email protected]>

* custom command to log in with 2FA enabled user. Reading admin user data from .env file. Inbox Notif script record owner adds trusted individual. Inbox notif admin adds trusted individual to a record.

* 🤖 GITHUB ACTIONS

* Additional fixes around is this you and expand review accessibility (#1839)

* Additional fixes around is this you and expand review accesibility

* 🤖 GITHUB ACTIONS

* Manually add work setting credit role for record owner

* 🤖 GITHUB ACTIONS

* 8407-qa-accessible-text-for-sign-in-to-start-editing-link (#1842)

* 8407-qa-accessible-text-for-sign-in-to-start-editing-link

* Fix merge conflicts

* Manual pull PT update

* 🤖 GITHUB ACTIONS

* 🤖 GITHUB ACTIONS

* Bump json5 from 2.2.1 to 2.2.3

Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](json5/json5@v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* 8432-qa-cannot-add-trusted-individuals-searching-by-orcid-id

* cypress+qase integration for test runs results

* 🤖 GITHUB ACTIONS

* removing unnecessary comment lines

* add other contributor to work different roles scenarios

* 🤖 GITHUB ACTIONS

* contributors counter automatically updates while adding new work

* 🤖 GITHUB ACTIONS

* delete contributors when adding/editing

* 🤖 GITHUB ACTIONS

* 8388-sidebar-forms-tab-order-headings-and-sections

* contributors scripts adding while editing, also update script to add qase tag for test runs

* 🤖 GITHUB ACTIONS

* Enable dynamic tags

* Add affiliation tags

* Enable headers and sections

* Add testing l

* Remove debug code

* Fix format

* fix: Sort countries alphabetically in differrent languages

* 🤖 GITHUB ACTIONS

* Apply translations in ko

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'ko' language.

* Apply translations in ko

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'ko' language.

* Apply translations in ko

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'ko' language.

* Apply translations in ko

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'ko' language.

* Apply translations in ko

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'ko' language.

* Apply translations in ko

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'ko' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'zh_CN' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'zh_CN' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'zh_CN' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'zh_CN' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'zh_TW' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'zh_TW' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'zh_TW' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'zh_TW' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'zh_TW' language.

* Apply translations in zh_TW

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'zh_TW' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'zh_CN' language.

* Apply translations in zh_CN

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'zh_CN' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'cs' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'cs' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'cs' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'cs' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'cs' language.

* Apply translations in cs

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'cs' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'ar' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'ar' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'ar' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'ar' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'ar' language.

* Apply translations in ar

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'ar' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'es' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'es' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'es' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'es' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'es' language.

* Apply translations in es

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'es' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'it' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'it' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'it' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'it' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'it' language.

* Apply translations in it

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'it' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'pt' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'pt' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'pt' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'pt' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'pt' language.

* Apply translations in pt

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'pt' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'ru' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'ru' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'ru' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'ru' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'ru' language.

* Apply translations in ru

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'ru' language.

* style: Fix cropped icons (#1853)

* style: Fix typo in contributors form in english (#1854)

* 8440-works-tab-order-headings-and-sections

* 🤖 GITHUB ACTIONS

* Fix testing

* Apply translations in ja

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'ja' language.

* Apply translations in ja

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'ja' language.

* Apply translations in ja

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'ja' language.

* Apply translations in ja

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'ja' language.

* Apply translations in ja

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'ja' language.

* Apply translations in ja

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'ja' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/delegators/delegators.en.properties'
on the 'fr' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/layout/layout.en.properties'
on the 'fr' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/record/record.en.properties'
on the 'fr' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/works/works.en.properties'
on the 'fr' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/shared/shared.en.properties'
on the 'fr' language.

* Apply translations in fr

translation completed for the source file '/src/locale/properties/top-bar/top-bar.en.properties'
on the 'fr' language.

* contributors name field validations

* 🤖 GITHUB ACTIONS

* build: Update google-analytics UA tag to GA4 (#1859)

* a11y

* 🤖 GITHUB ACTIONS

* tx pull -f & search replace empty spaces

* 🤖 GITHUB ACTIONS

* fix: Use GTM tag instead of analytics property id (#1862)

* style: Add missing primary email address header

* style: Add screen readers labels and role group to publication date

* 🤖 GITHUB ACTIONS

* remove random z

* Add back         id=cy-work-types

* 🤖 GITHUB ACTIONS

* 🤖 GITHUB ACTIONS

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Leonardo Mendoza Fernadez <[email protected]>
Co-authored-by: Daniel Palafox <[email protected]>
Co-authored-by: kprisAutomation <[email protected]>
Co-authored-by: Camelia <[email protected]>
Co-authored-by: Karen Madrigal <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
8 people authored Jan 31, 2023
1 parent e05af44 commit 8b8923f
Show file tree
Hide file tree
Showing 144 changed files with 5,644 additions and 2,420 deletions.
40 changes: 27 additions & 13 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,34 @@ export default defineConfig({
chromeWebSecurity: false,
viewportWidth: 1000,
viewportHeight: 1000,
reporter: 'cypress-mochawesome-reporter',
reporter: 'cypress-multi-reporters',
reporterOptions: {
charts: true,
overwrite: false,
quiet: true,
html: false,
json: true,
embeddedScreenshots: true,
inlineAssets: true,
saveAllAttempts: false,
reportDir: 'cypress/reports/mochawesome-report',
reportPageTitle: 'Orcid Automated Regression Test Results',
reportFileName: '[status]_[daytime]-[name]-report',
timestamp: 'longDate',
reporterEnabled: 'cypress-qase-reporter,cypress-mochawesome-reporter',
cypressMochawesomeReporterReporterOptions: {
charts: true,
overwrite: false,
quiet: true,
html: false,
json: true,
embeddedScreenshots: true,
inlineAssets: true,
saveAllAttempts: false,
reportDir: 'cypress/reports/mochawesome-report',
reportPageTitle: 'Orcid Automated Regression Test Results',
reportFileName: '[status]_[daytime]-[name]-report',
timestamp: 'longDate',
},
cypressQaseReporterReporterOptions: {
apiToken: process.env.CY_QASE_TOKEN,
projectCode: process.env.CY_QASE_PROJECT_CODE,
logging: true,
basePath: 'https://api.qase.io/v1',
screenshotFolder: 'screenshots',
sendScreenshot: true,
runComplete: true,
environmentId: 1,
rootSuiteTitle: 'Cypress tests',
},
},
e2e: {
setupNodeEvents(on, config) {
Expand Down
71 changes: 71 additions & 0 deletions cypress/e2e/contributors/add-more-contrib-editing-work.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/// <reference types="cypress" />

import userData from '../../fixtures/contributors-fixtures/contributors-users.fixture.json'
import { qase } from 'cypress-qase-reporter/dist/mocha'

describe('Add other contributor while editing work', async function () {
const workType = 'Book'
const title = 'Cypress test contributors 8'
const otherContributorName = 'Keanu Reeves'
const creditRole = 'Investigation'

before(() => {
//add a work manually
cy.visit(Cypress.env('signInURL'))
cy.signin(userData.cyRecordOwner)
cy.get('#cy-works').within(($myPanel) => {
cy.get('#cy-menu-add-works').click()
})
cy.get('#cy-add-work-manually').click({ force: true })
cy.get('#cy-work-types').click()
cy.get('#cy-work-types-panel').within(($myOptions) => {
cy.contains(workType).click()
})
cy.get('#title-input').clear().type(title)
//save entry
cy.get('#save-work-button').wait(1000).click({ force: true })
cy.wait(2000)
})

qase(
'8',
it('Add other contributor while editing work', function () {
//edit work added
cy.contains('app-work-stack', title).within(($thisWork) => {
cy.get('button[aria-label*="Edit work"]').click()
})
//add someone else as contributor with credit role
cy.get('#cy-add-another-contributor').click()
cy.get('app-work-contributors').within(($section) => {
cy.get('[formcontrolname="creditName"]')
.clear()
.type(otherContributorName)
cy.get('[formcontrolname="role"]').click({ force: true })
})
//choose credit role
cy.get('[role="listbox"]').within(($list) => {
cy.contains(creditRole).click()
})

//save entry
cy.get('#save-work-button').wait(1000).click({ force: true })
cy.wait(2000)

//Verify work was added
cy.contains('app-panel-data', otherContributorName).within(
($thisWork) => {
cy.contains('Show more detail').click()
}
)

//verify contributor is displayed in details section for this work
cy.get('app-display-attribute').contains(otherContributorName)
})
) //end of qase tag

after(() => {
//log out
cy.get('#cy-user-info').click({ force: true })
cy.get('#cy-signout').click({ force: true })
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/// <reference types="cypress" />

import userData from '../../fixtures/contributors-fixtures/contributors-users.fixture.json'
import { qase } from 'cypress-qase-reporter/dist/mocha'

describe('Add more contributors while editing a work with 50 contributors', async function () {
const workTitle = 'QASE19'
const noticeMessage = 'You cannot add any more contributors to this work'

before(() => {
//log in with user that has 50 contrib
cy.visit(Cypress.env('signInURL'))
cy.signin(userData.cy50Contrib)
})

qase(
'19',
it('Add more contributors while editing a work with 50 contributors', function () {
//edit work added
cy.contains('app-work-stack', workTitle).within(($thisWork) => {
cy.get('button[aria-label*="Edit work"]').click()
})
//verify link to add one more contrib is disabled
cy.get('#cy-add-another-contributor').should('have.class', 'disabled')

//verify the panel is displayed
cy.contains('.notice-panel', noticeMessage)
})
) //end of qase tag

after(() => {
//log out
cy.get('#cy-user-info').click({ force: true })
cy.get('#cy-signout').click({ force: true })
})
})
68 changes: 68 additions & 0 deletions cypress/e2e/contributors/add-other-contributor-credit-role.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/// <reference types="cypress" />

import userData from '../../fixtures/contributors-fixtures/contributors-users.fixture.json'
import { qase } from 'cypress-qase-reporter/dist/mocha'

describe('Other ppl contributions - add contributor with credit role', async function () {
before(() => {
cy.visit(Cypress.env('signInURL'))
cy.signin(userData.cyRecordOwner)
})

qase(
'3',
it('Add other contributor with credit role to a work added manually', function () {
const workType = 'Book'
const title = 'Cypress test contributors'
const otherContributorName = 'Michael Jordan'
const creditRole = 'Investigation'

cy.get('#cy-works').within(($myPanel) => {
cy.get('#cy-menu-add-works').click()
})
cy.get('#cy-add-work-manually').click({ force: true })
cy.get('#cy-work-types').click()
cy.get('#cy-work-types-panel').within(($myOptions) => {
cy.contains(workType).click()
})
cy.get('#title-input').clear().type(title)
cy.get('#cy-work-types').click()
cy.get('#cy-work-types-panel').within(($myOptions) => {
cy.contains(workType).click()
})
//add someone else as contributor with credit role
cy.get('#cy-add-another-contributor').click()
cy.get('app-work-contributors').within(($section) => {
cy.get('[formcontrolname="creditName"]')
.clear()
.type(otherContributorName)
cy.get('[formcontrolname="role"]').click({ force: true })
})
//choose credit role
cy.get('[role="listbox"]').within(($list) => {
//to do REPLACE with id for the element next sprint
cy.contains(creditRole).click()
})

//save entry
cy.get('#save-work-button').wait(1000).click({ force: true })
cy.wait(2000)

//Verify work was added
cy.contains('app-panel-data', otherContributorName).within(
($thisWork) => {
cy.contains('Show more detail').click()
}
)

//verify contributor is displayed in details section for this work
cy.get('app-display-attribute').contains(otherContributorName)
})
) //end of qase tag

after(() => {
//log out
cy.get('#cy-user-info').click({ force: true })
cy.get('#cy-signout').click({ force: true })
})
})
98 changes: 98 additions & 0 deletions cypress/e2e/contributors/add_other_contrib_duplicate_roles.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/// <reference types="cypress" />

import userData from '../../fixtures/contributors-fixtures/contributors-users.fixture.json'
import { qase } from 'cypress-qase-reporter/dist/mocha'

describe('Add other contributor with duplicate roles - negative testing', async function () {
before(() => {
cy.visit(Cypress.env('signInURL'))
cy.signin(userData.cyRecordOwner)
})

qase(
'32',
it('Add other contributor with duplicate roles - negative testing', function () {
const workType = 'Book'
const title = 'Cypress test contributors 32'
const otherContributorName = 'Bryan Adams'
const creditRole = 'Conceptualization'
const fieldErrorMessage = 'Role cannot be duplicated'
const formErrorPopUp = 'Form validation error'

cy.get('#cy-works').within(($myPanel) => {
cy.get('#cy-menu-add-works').click()
})
cy.get('#cy-add-work-manually').click({ force: true })
cy.get('#cy-work-types').click()
cy.get('#cy-work-types-panel').within(($myOptions) => {
cy.contains(workType).click()
})
cy.get('#title-input').clear().type(title)
cy.get('#cy-work-types').click()
cy.get('#cy-work-types-panel').within(($myOptions) => {
cy.contains(workType).click()
})
//add someone else as contributor with credit role
cy.get('#cy-add-another-contributor').click()
cy.get('app-work-contributors').within(($section) => {
cy.get('[formcontrolname="creditName"]')
.clear()
.type(otherContributorName)
cy.get('[formcontrolname="role"]').click({ force: true })
})
//choose credit role
cy.get('[role="listbox"]').within(($list) => {
cy.contains(creditRole).click()
cy.wait(1000)
})
cy.get('app-work-contributors').within(($section) => {
cy.get('#cy-add-another-role').click()
cy.get('[formcontrolname="role"]')
.contains('No Specified Role')
.click({ force: true })
cy.wait(2000)
})
//choose credit role
cy.get('[role="listbox"]').within(($list) => {
cy.contains(creditRole).click()
cy.wait(1000)
})
//form validation is displayed
cy.get('mat-error')
.contains(fieldErrorMessage, { matchCase: false })
.should('be.visible')

//try to save entry
cy.get('#save-work-button').wait(1000).click({ force: true })
cy.wait(1000)
cy.get('snack-bar-container')
.contains(formErrorPopUp, { matchCase: false })
.should('be.visible')

//remove duplicate role
cy.get('app-work-contributors').within(($section) => {
cy.get('[id*="cy-remove-role"]').click()
})

//save entry
cy.get('#save-work-button').wait(1000).click({ force: true })

//Verify work was added
cy.contains('app-panel-data', otherContributorName).within(
($thisWork) => {
cy.contains('Show more detail').click()
}
)
//verify contributor is displayed in details section for this work
cy.get('app-display-attribute')
.contains(otherContributorName)
.contains(creditRole, { matchCase: false })
})
) //end of qase tag

after(() => {
//log out
cy.get('#cy-user-info').click({ force: true })
cy.get('#cy-signout').click({ force: true })
})
})
Loading

0 comments on commit 8b8923f

Please sign in to comment.