forked from maplibre/maputnik
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
export default class ThirdPartyDriver { | ||
public given = { | ||
/** | ||
public given = { | ||
/** | ||
* | ||
* @param url a url to a file, this assumes the file name is the last part of the url | ||
* @param alias | ||
*/ | ||
interceptGetToFile(url: string) { | ||
let fileNameAndAlias = url.split('/').pop(); | ||
cy.intercept('GET', url, { fixture: fileNameAndAlias }).as(fileNameAndAlias!); | ||
}, | ||
interceptGetToFile(url: string) { | ||
let fileNameAndAlias = url.split('/').pop(); | ||
cy.intercept('GET', url, { fixture: fileNameAndAlias }).as(fileNameAndAlias!); | ||
}, | ||
|
||
interceptAndIgnore(url: string) { | ||
cy.intercept({ method: "GET", url }, []); | ||
} | ||
interceptAndIgnore(url: string) { | ||
cy.intercept({ method: "GET", url }, []); | ||
} | ||
} | ||
|
||
public get = { | ||
element(slector: string) { | ||
return cy.get(slector); | ||
} | ||
public get = { | ||
element(slector: string) { | ||
return cy.get(slector); | ||
} | ||
} | ||
|
||
public when = { | ||
confirmAlert() { | ||
cy.on("window:confirm", () => true); | ||
} | ||
public when = { | ||
confirmAlert() { | ||
cy.on("window:confirm", () => true); | ||
} | ||
} | ||
} |