Skip to content

Commit

Permalink
ci: fix e2e for pristine commits
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhwhite committed Sep 19, 2024
1 parent a4ab15a commit 0b45fdf
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/e2e-affected/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ runs:
'--withTarget=e2e',
'--affected',
'--json'
]).then(({stdout}) => JSON.parse(stdout));
]).then(({stdout}) => JSON.parse(stdout)).catch(() => []);
const projectAffected = affectedProjects.includes('${{ inputs.project }}');
if (projectAffected) {
core.info(`E2E tests affected`);
Expand Down
34 changes: 29 additions & 5 deletions apps/integration-e2e/src/e2e/modal-viewkept-toolbars.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,48 @@ describe('modal-viewkept-toolbars', () => {
});

it('verify viewkept toolbar in modal', () => {
cy.get('#ready')
cy.get('#ready', { timeout: 10000 })
.should('exist')
.end()
.get('#modal-viewkept-toolbars-modal-trigger')
.should('be.visible')
.should('contain', 'Open modal')
.click();
cy.get('sky-modal-header')
.should('exist')
.should('be.visible')
.should('contain', 'Viewkeeper inside a Modal');
cy.get('.sky-lookup-show-more-modal-toolbar').should('be.visible');
cy.get('.sky-lookup-show-more-modal-multiselect-toolbar').should(
'be.visible',
);
cy.get('.sky-lookup-show-more-modal-toolbar')
.should('exist')
.should('be.visible');
cy.get('.sky-lookup-show-more-modal-toolbar sky-icon[icon="search"]')
.should('exist')
.should('be.visible');
cy.get(
'.sky-lookup-show-more-modal-toolbar sky-icon[icon="search"] > i',
)
.should('exist')
.should('be.visible')
.should('have.css', 'height');
cy.get('.sky-lookup-show-more-modal-multiselect-toolbar')
.should('exist')
.should('be.visible');
cy.get('sky-modal-content > p:nth-child(2)').should('be.visible');
cy.get('.sky-modal-content').should('be.visible').scrollTo('bottom');
cy.get('sky-modal-content > p:nth-child(2)').should('not.be.visible');
cy.get('.sky-lookup-show-more-modal-toolbar').should('be.visible');
cy.get('sky-modal-content > .sky-viewkeeper-fixed').should(
'satisfy',
(el: JQuery<HTMLElement>) =>
el.first() && parseFloat(el.first().css('opacity')) > 0.9,
);
cy.get(
'.sky-lookup-show-more-modal-toolbar sky-icon[icon="search"] > i',
).should(
'satisfy',
(el: JQuery<HTMLElement>) =>
el.first() && parseFloat(el.first().css('opacity')) > 0.9,
);
cy.get('.sky-lookup-show-more-modal-multiselect-toolbar').should(
'be.visible',
);
Expand Down

0 comments on commit 0b45fdf

Please sign in to comment.