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

Revert "FW-5992 add bulk visibility api to qa tests" #732

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ jobs:

- name: Run tests
run: |
npx cypress run --config projectId=$CYPRESS_PROJECT_ID --record --key $CYPRESS_RECORD_KEY --env baseUrl='https://dev.firstvoices.com/',CYPRESS_DIALECT='lilwat',CYPRESS_FV_USERNAME=${{secrets.CYPRESS_FV_USERNAME}},CYPRESS_FV_PASSWORD=${{secrets.CYPRESS_FV_PASSWORD}},CYPRESS_FV_INITIALS=${{secrets.CYPRESS_FV_INITIALS}},CYPRESS_ORIGIN=${{secrets.CYPRESS_ORIGIN}},retries=2 -s "cypress/e2e/core_suite_master.cy.js"
npx cypress run --config projectId=$CYPRESS_PROJECT_ID --record --key $CYPRESS_RECORD_KEY --env baseUrl='https://dev.firstvoices.com/',DIALECT='lilwat',CYPRESS_FV_USERNAME=${{secrets.CYPRESS_FV_USERNAME}},CYPRESS_FV_PASSWORD=${{secrets.CYPRESS_FV_PASSWORD}},CYPRESS_FV_INITIALS=${{secrets.CYPRESS_FV_INITIALS}},CYPRESS_ORIGIN=${{secrets.CYPRESS_ORIGIN}},retries=2 -s "cypress/e2e/core_suite_master.cy.js"
env:
baseUrl: 'https://dev.firstvoices.com/'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_FV_USERNAME: ${{ secrets.CYPRESS_FV_USERNAME }}
CYPRESS_FV_PASSWORD: ${{ secrets.CYPRESS_FV_PASSWORD }}
CYPRESS_FV_INITIALS: ${{ secrets.CYPRESS_FV_INITIALS }}
CYPRESS_DIALECT: ${{ secrets.CYPRESS_DIALECT }}
46 changes: 40 additions & 6 deletions cypress/e2e/dashboard/pages.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ describe(
() => {
beforeEach(() => {
cy.viewport(1024, 768)
})

it('4.1 - custom page', () => {
const site = `${Cypress.env('baseUrl')}${Cypress.env(
'DIALECT',
)}/custom/qacustompage`
cy.visit(`${Cypress.env('baseUrl')}`)
cy.contains('Sign in').click()
cy.origin(`${Cypress.env('CYPRESS_ORIGIN')}`, () => {
Expand All @@ -26,12 +32,6 @@ describe(
Cypress.env('CYPRESS_FV_PASSWORD'),
)
})
})

it('4.1 - custom page', () => {
const site = `${Cypress.env('baseUrl')}${Cypress.env(
'CYPRESS_DIALECT',
)}/custom/qacustompage`

cy.contains('Explore Languages').should('be.visible')
cy.visit(site)
Expand All @@ -43,6 +43,22 @@ describe(
})

it('3.1 edit homepage', () => {
cy.visit(`${Cypress.env('baseUrl')}`)
cy.contains('Sign in').click()
cy.origin(`${Cypress.env('CYPRESS_ORIGIN')}`, () => {
Cypress.Commands.add('login', (email, password) => {
cy.get('#signInFormUsername').type(email, { force: true })
// lets try an incorrect password
cy.get('#signInFormPassword').type(`${password}{enter}`, {
force: true,
})
})

cy.login(
Cypress.env('CYPRESS_FV_USERNAME'),
Cypress.env('CYPRESS_FV_PASSWORD'),
)
})
cy.contains('Explore Languages').click()
cy.contains(`${Cypress.env('CYPRESS_FV_INITIALS')}`).click()
cy.contains('Dashboard').click()
Expand All @@ -52,6 +68,24 @@ describe(
})

it('12.2 - Page Text', () => {
cy.visit(`${Cypress.env('baseUrl')}`)
cy.contains('Sign in').click()
cy.origin(`${Cypress.env('CYPRESS_ORIGIN')}`, () => {
Cypress.Commands.add('login', (email, password) => {
cy.on('uncaught:exception', () => false)

cy.get('#signInFormUsername').type(email, { force: true })
// lets try an incorrect password
cy.get('#signInFormPassword').type(`${password}{enter}`, {
force: true,
})
})

cy.login(
Cypress.env('CYPRESS_FV_USERNAME'),
Cypress.env('CYPRESS_FV_PASSWORD'),
)
})
cy.contains('Explore Languages').click()
cy.contains(`${Cypress.env('CYPRESS_FV_INITIALS')}`).click()
cy.contains('Dashboard').click()
Expand Down
7 changes: 5 additions & 2 deletions cypress/e2e/dashboard/speaker.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe(
cy.contains('Explore Languages').click()
})
it('Create Speaker', () => {
cy.visit(`${Cypress.env('baseUrl')}${Cypress.env('CYPRESS_DIALECT')}`)
cy.visit(`${Cypress.env('baseUrl')}${Cypress.env('DIALECT')}`)
cy.contains(`${Cypress.env('CYPRESS_FV_INITIALS')}`).click()
cy.contains('Dashboard').click()
cy.contains('Create').click()
Expand Down Expand Up @@ -64,7 +64,10 @@ describe(
cy.contains('Dashboard').click()
cy.contains('Edit').click()
cy.contains('Edit speakers').click()
cy.get('[data-testid="edit-speaker-qatestspeaker"]').eq(0).click()
cy.get('[data-testid="edit-speaker-qatestspeaker"]').click()
cy.get('#bio')
.invoke('val')
.then((sometext) => sometext === 'this is the new value')
cy.contains('Delete Speaker').click()
cy.get('[data-testid="DeleteModal"]').contains('Delete').click()
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/songs.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe(
cy.contains('Learn').click()
cy.contains('Songs').click()
cy.contains('Use list view').click()
cy.get('[data-testid="SongAndStoriesListRow"]').each((_song) => {
cy.get('.pb-16 > .w-full >').each((_song) => {
cy.wrap(_song).scrollIntoView()
cy.wrap(_song).should('be.enabled')
cy.wrap(_song).click()
Expand Down
18 changes: 8 additions & 10 deletions cypress/e2e/stories.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ describe(
cy.contains('Learn').click()
cy.contains('Stories').click()
cy.contains('Use list view').click()
cy.get('[data-testid="SongAndStoriesListRow"]', { timeout: 10000 }).each(
(_song) => {
cy.wrap(_song).should('be.enabled')
cy.wrap(_song).click()
cy.contains('Loading').should('not.exist')
cy.contains('Go to Story').scrollIntoView()
cy.contains('Go to Story').should('be.visible')
cy.get('#CloseDrawerBtn').click()
},
)
cy.get('.pb-16 > .w-full >', { timeout: 10000 }).each((_song) => {
cy.wrap(_song).should('be.enabled')
cy.wrap(_song).click()
cy.contains('Loading').should('not.exist')
cy.contains('Go to Story').scrollIntoView()
cy.contains('Go to Story').should('be.visible')
cy.get('#CloseDrawerBtn').click()
})
})
},
) // end of describe
Loading