Update cypress import paths

This commit is contained in:
Ramon Wenger 2022-04-14 13:19:29 +02:00
parent 65426fc034
commit 2cf1ba619b
10 changed files with 26 additions and 16 deletions

View File

@ -1,5 +1,5 @@
import module from '../../fixtures/module.minimal';
import {getMinimalMe} from '../../support/helpers';
import module from '../../../fixtures/module.minimal';
import {getMinimalMe} from '../../../support/helpers';
describe('Snapshot', () => {
const operations = isTeacher => ({

View File

@ -1,5 +1,5 @@
import {getMe} from '../../support/helpers';
import mocks from '../../fixtures/mocks';
import {getMe} from '../../../support/helpers';
import mocks from '../../../fixtures/mocks';
const modules = {
'lohn-und-budget': {

View File

@ -1,4 +1,4 @@
import {assertStartPage} from '../../support/helpers';
import {assertStartPage} from '../../../support/helpers';
describe('Onboarding', () => {
beforeEach(() => {

View File

@ -1,4 +1,4 @@
import {getMinimalMe} from '../../support/helpers';
import {getMinimalMe} from '../../../support/helpers';
describe('Sidebar', () => {
beforeEach(() => {

View File

@ -1,4 +1,4 @@
import {getMinimalMe} from '../../support/helpers';
import {getMinimalMe} from '../../../support/helpers';
// const me = require('../../fixtures/me.new-student.json');

View File

@ -1,7 +1,7 @@
import {hasOperationName} from '../../support/graphql';
import {hasOperationName} from '../../../support/graphql';
const me = require('../../fixtures/me.join-class.json');
const {getMinimalMe} = require('../../support/helpers');
const me = require('../../../fixtures/me.join-class.json');
const {getMinimalMe} = require('../../../support/helpers');
const MeQuery = getMinimalMe({});
const {me: teacher} = MeQuery;

View File

@ -1,5 +1,5 @@
import {getMinimalMe} from '../../support/helpers';
import {hasOperationName} from '../../support/graphql';
import {getMinimalMe} from '../../../support/helpers';
import {hasOperationName} from '../../../support/graphql';
const teacher = getMinimalMe();

View File

@ -10,11 +10,13 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
require("tsconfig-paths").register();
import {readFileSync} from 'fs';
import {resolve} from 'path';
const {readFileSync} = require('fs');
const {resolve} = require('path');
// import webpackPreprocessor from '@cypress/webpack-preprocessor';
module.exports = (on, config) => {
module.exports = (on) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('task', {

View File

@ -16,7 +16,7 @@ declare namespace Cypress {
* @example
* cy.getByDataCy('my-new-button')
*/
getByDataCy(selector: string): Chainable<any>
getByDataCy(selector: string): Chainable<Element>
selectClass(schoolClass: string): void

View File

@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
},
"include": ["**/*.ts"]
}