Skip to content

Commit

Permalink
Rename command exports
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelDeMartin committed Dec 22, 2023
1 parent 6e0f9fe commit c7cdfc8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/support/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@ import * as crudCommands from './crud';
import * as fixturesCommands from './fixtures';
import * as tasksCommands from './tasks';

export const commands = {
export const solidCommands = {
...authCommands,
...crudCommands,
...fixturesCommands,
...tasksCommands,
};

/**
* @deprecated use solidCommands instead.
*/
export const commands = solidCommands;

export interface SolidOptions {
solid?: {
serverUrl?: string;
};
}
export type CustomCommands = typeof commands;
export type CustomSolidCommands = typeof solidCommands;

/**
* @deprecated use CustomSolidCommands instead.
*/
export type CustomCommands = CustomSolidCommands;

export default function(): void {
for (const [name, implementation] of Object.entries(commands)) {
for (const [name, implementation] of Object.entries(solidCommands)) {
Cypress.Commands.add(
name as unknown as keyof Cypress.Chainable,
implementation as Cypress.CommandFn<keyof Cypress.ChainableMethods>,
Expand All @@ -28,6 +38,6 @@ export default function(): void {

declare global {
namespace Cypress {
interface Chainable extends CustomCommands {}
interface Chainable extends CustomSolidCommands {}
}
}

0 comments on commit c7cdfc8

Please sign in to comment.