Skip to content

Commit

Permalink
feat: add extra assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jwhiles committed May 14, 2021
1 parent d098e27 commit 1daa267
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/cypress/integration/entry-editor-aliased.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,23 @@ context(`Aliased Entry editor extension (${role})`, () => {
})
})

it('verifies that onValueChanged is called with the initial value and updates', () => {
it('verifies that API calls use the active Alias', () => {
const aliasId = Cypress.env('activeAliasId')
const spaceId = Cypress.env('activeSpaceId')
cy.intercept({
method: 'GET',
url: `/spaces/${spaceId}/environments/*/content_types`,
}).as('contentTypesRequest')
cy.intercept({
method: 'GET',
url: `spaces/${spaceId}/environments/*/entries/${post.id}/tasks`,
}).as('tasksRequest')

cy.getSdk(iframeSelector).then(async (sdk) => {
sdk.space.getContentTypes()
cy.wait('@contentTypesRequest').its('request.url').should('include', aliasId)
sdk.entry.getTasks()
cy.wait('@tasksRequest').its('request.url').should('include', aliasId)
})
})
})

0 comments on commit 1daa267

Please sign in to comment.