Skip to content

Commit

Permalink
wip: fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
burivuhster committed Sep 26, 2024
1 parent 098a057 commit d649d1d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cypress/e2e/5-ndv.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,8 @@ describe('NDV', () => {
ndv.getters.parameterInput('operation').find('input').should('have.value', 'Delete');
});

it('Should show error state when remote options cannot be fetched', () => {
cy.intercept('POST', '/rest/dynamic-node-parameters/options', { statusCode: 500 }).as(
it('Should show a notice when remote options cannot be fetched because of missing credentials', () => {
cy.intercept('POST', '/rest/dynamic-node-parameters/options', { statusCode: 403 }).as(
'parameterOptions',
);

Expand All @@ -684,20 +684,15 @@ describe('NDV', () => {
action: 'Update a database page',
});

clickCreateNewCredential();
setCredentialValues({
apiKey: 'sk_test_123',
});

ndv.actions.addItemToFixedCollection('propertiesUi');
ndv.getters
.parameterInput('key')
.find('input')
.should('have.value', 'Error fetching options from Notion');
.should('have.value', 'Set up credential to see options');
});

it('Should show a notice when remote options cannot be fetched because of missing credentials', () => {
cy.intercept('POST', '/rest/dynamic-node-parameters/options', { statusCode: 403 }).as(
it('Should show error state when remote options cannot be fetched', () => {
cy.intercept('POST', '/rest/dynamic-node-parameters/options', { statusCode: 500 }).as(
'parameterOptions',
);

Expand All @@ -706,11 +701,16 @@ describe('NDV', () => {
action: 'Update a database page',
});

clickCreateNewCredential();
setCredentialValues({
apiKey: 'sk_test_123',
});

ndv.actions.addItemToFixedCollection('propertiesUi');
ndv.getters
.parameterInput('key')
.find('input')
.should('have.value', 'Set up credential to see options');
.should('have.value', 'Error fetching options from Notion');
});

it('Should open appropriate node creator after clicking on connection hint link', () => {
Expand Down

0 comments on commit d649d1d

Please sign in to comment.