diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/frontend/__helpers__/fixtures.js | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/frontend/__helpers__/fixtures.js')
-rw-r--r-- | spec/frontend/__helpers__/fixtures.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/spec/frontend/__helpers__/fixtures.js b/spec/frontend/__helpers__/fixtures.js index d8054d32fae..a6f7b37161e 100644 --- a/spec/frontend/__helpers__/fixtures.js +++ b/spec/frontend/__helpers__/fixtures.js @@ -20,24 +20,15 @@ Did you run bin/rake frontend:fixtures?`, return fs.readFileSync(absolutePath, 'utf8'); } -/** - * @deprecated Use `import` to load a JSON fixture instead. - * See https://docs.gitlab.com/ee/development/testing_guide/frontend_testing.html#use-fixtures, - * https://gitlab.com/gitlab-org/gitlab/-/issues/339346. - */ -export const getJSONFixture = (relativePath) => JSON.parse(getFixture(relativePath)); - export const resetHTMLFixture = () => { document.head.innerHTML = ''; document.body.innerHTML = ''; }; -export const setHTMLFixture = (htmlContent, resetHook = afterEach) => { +export const setHTMLFixture = (htmlContent) => { document.body.innerHTML = htmlContent; - resetHook(resetHTMLFixture); }; -export const loadHTMLFixture = (relativePath, resetHook = afterEach) => { - const fileContent = getFixture(relativePath); - setHTMLFixture(fileContent, resetHook); +export const loadHTMLFixture = (relativePath) => { + setHTMLFixture(getFixture(relativePath)); }; |