Skip to content

Commit

Permalink
poc error ts
Browse files Browse the repository at this point in the history
  • Loading branch information
agustingutierrezcompass committed Nov 25, 2024
1 parent f01f393 commit 52b8413
Show file tree
Hide file tree
Showing 7 changed files with 3,338 additions and 6 deletions.
5 changes: 0 additions & 5 deletions cypress.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {defineConfig} from 'cypress';

export default defineConfig({ e2e: {
supportFile: 'cypress/support/index.ts',
setupNodeEvents(on, config) {},
},
})
3 changes: 3 additions & 0 deletions cypress/support/commands.js → cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
Cypress.Commands.add('hasPseudoElement', {prevSubject: true}, (subject: HTMLElement, pseudo: string) => {
return window.getComputedStyle(subject[0], pseudo).content !== 'none';
});
File renamed without changes.
9 changes: 9 additions & 0 deletions cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import './commands';

declare global {
namespace Cypress {
interface Chainable {
hasPseudoElement: (subject: JQueryWithSelector<HTMLElement>, pseudo: string) => Chainable<JQueryWithSelector>;
}
}
}
Loading

0 comments on commit 52b8413

Please sign in to comment.