parent
70671e4ad6
commit
303dc2aba8
|
|
@ -5,5 +5,6 @@
|
|||
"reporterOptions": {
|
||||
"mochaFile": "cypress/test-reports/cypress-results-[hash].xml",
|
||||
"toConsole": true
|
||||
}
|
||||
},
|
||||
"$schema": "https://on.cypress.io/cypress.schema.json"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,21 @@
|
|||
describe('Survey', () => {
|
||||
describe('Apply module visibility', () => {
|
||||
it('needs to be implemented', () => {
|
||||
expect(true).to.equal(false);
|
||||
cy.viewport('macbook-15');
|
||||
// login as teacher
|
||||
cy.login('nico.zickgraf', 'test', true);
|
||||
cy.wait('@gqlBetaLogin');
|
||||
// go to module
|
||||
cy.visit('/module/lohn-und-budget');
|
||||
cy.selectClass('Andere Klasse');
|
||||
// click on settings
|
||||
cy.dataCy('module-settings-button').click();
|
||||
// click on select button
|
||||
cy.dataCy('select-school-class-button').click();
|
||||
// select schoolclass
|
||||
cy.dataCy('school-class-visibility-dropdown').select('FLID2018a');
|
||||
// save changes
|
||||
cy.dataCy('save-visibility-button').click();
|
||||
|
||||
cy.dataCy('module-title').should('exist');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ describe('Email Verifcation', () => {
|
|||
},
|
||||
}
|
||||
});
|
||||
cy.apolloLogin('rahel.cueni', 'test')
|
||||
cy.apolloLogin('rahel.cueni', 'test');
|
||||
|
||||
cy.visit('/license-activation');
|
||||
cy.redeemCoupon('12345asfd');
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ describe('Login', () => {
|
|||
message: 'success',
|
||||
success: true
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
@ -69,5 +69,5 @@ describe('Login', () => {
|
|||
|
||||
cy.checkEmailAvailable('feuzaebi.ch');
|
||||
cy.get('[data-cy="email-local-errors"]').contains('Bitte geben Sie eine gülitge E-Mail an');
|
||||
})
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ Cypress.Commands.add('redeemCoupon', coupon => {
|
|||
cy.get('[data-cy="coupon-input"]').type(coupon);
|
||||
}
|
||||
cy.get('[data-cy="coupon-button"]').click();
|
||||
})
|
||||
});
|
||||
|
||||
Cypress.Commands.add('assertStartPage', (onboarding) => {
|
||||
if (onboarding) {
|
||||
|
|
@ -174,3 +174,13 @@ Cypress.Commands.add('assertStartPage', (onboarding) => {
|
|||
Cypress.Commands.add('skipOnboarding', (onboarding) => {
|
||||
cy.get('[data-cy=onboarding-skip-link]').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('dataCy', (selector) => {
|
||||
return cy.get(`[data-cy=${selector}]`);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('selectClass', (schoolClass) => {
|
||||
cy.dataCy('user-widget-avatar').click();
|
||||
cy.dataCy('class-selection').click();
|
||||
cy.dataCy('class-selection-entry').contains(schoolClass).click();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -44,12 +44,6 @@
|
|||
"eslint-config-standard": "^10.2.1",
|
||||
"eslint-friendly-formatter": "^3.0.0",
|
||||
"eslint-loader": "^1.7.1",
|
||||
"eslint-plugin-cypress": "^2.11.2",
|
||||
"eslint-plugin-import": "^2.7.0",
|
||||
"eslint-plugin-node": "^5.2.0",
|
||||
"eslint-plugin-promise": "^3.4.0",
|
||||
"eslint-plugin-standard": "^3.0.1",
|
||||
"eslint-plugin-vue": "^4.0.0",
|
||||
"extract-text-webpack-plugin": "^3.0.0",
|
||||
"file-loader": "^1.1.4",
|
||||
"friendly-errors-webpack-plugin": "^1.6.1",
|
||||
|
|
@ -113,11 +107,19 @@
|
|||
"babel-jest": "^24.8.0",
|
||||
"canvas": "^2.5.0",
|
||||
"cypress": "^6.2.1",
|
||||
"eslint-plugin-cypress": "^2.11.2",
|
||||
"eslint-plugin-import": "^2.7.0",
|
||||
"eslint-plugin-node": "^5.2.0",
|
||||
"eslint-plugin-promise": "^3.4.0",
|
||||
"eslint-plugin-standard": "^3.0.1",
|
||||
"eslint-plugin-vue": "^4.0.0",
|
||||
"graphql-config": "^3.2.0",
|
||||
"jest": "^24.8.0",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"jest-transform-graphql": "^2.1.0",
|
||||
"jest-transform-stub": "^2.0.0",
|
||||
"jest-watch-typeahead": "^0.3.1",
|
||||
"typescript": "^4.2.3",
|
||||
"vue-jest": "^3.0.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {InMemoryCache, defaultDataIdFromObject} from 'apollo-cache-inmemory/lib/index';
|
||||
import {InMemoryCache, defaultDataIdFromObject} from 'apollo-cache-inmemory';
|
||||
import {createHttpLink} from 'apollo-link-http';
|
||||
import {onError} from 'apollo-link-error';
|
||||
import {ApolloClient} from 'apollo-client';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import gql from 'graphql-tag';
|
||||
|
||||
export const typeDefs = gql`
|
||||
type SidebarInput {
|
||||
input SidebarInput {
|
||||
navigation: Boolean
|
||||
profile: Boolean
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue