diff --git a/client/cypress/integration/bookmarks.spec.js b/client/cypress/integration/bookmarks.spec.js index 0677c4d6..eb8f0e39 100644 --- a/client/cypress/integration/bookmarks.spec.js +++ b/client/cypress/integration/bookmarks.spec.js @@ -1,4 +1,4 @@ -describe('Survey', () => { +describe('Bookmarks', () => { beforeEach(() => { // todo: mock all the graphql queries and mutations cy.exec("python ../server/manage.py prepare_bookmarks_for_cypress"); diff --git a/client/cypress/integration/join-class.spec.js b/client/cypress/integration/join-class.spec.js new file mode 100644 index 00000000..7472fb58 --- /dev/null +++ b/client/cypress/integration/join-class.spec.js @@ -0,0 +1,24 @@ +describe('Survey', () => { + beforeEach(() => { + // todo: mock all the graphql queries and mutations + // cy.exec("python ../server/manage.py prepare_bookmarks_for_cypress"); + + cy.viewport('macbook-15'); + cy.apolloLogin('rahel.cueni', 'test'); + }); + + it('should join class', () => { + cy.visit('/me/profile'); + + cy.get('[data-cy=class-selection]').click(); + cy.get('[data-cy=class-selection-entry]').should('have.length', 1); + + cy.get('[data-cy=join-class-link]').click(); + + cy.get('[data-cy=input-class-code]').type('XXXX'); + cy.get('[data-cy=join-class]').click(); + + cy.get('[data-cy=class-selection]').click(); + cy.get('[data-cy=class-selection-entry]').should('have.length', 2); + }) +}) diff --git a/client/src/components/ClassSelectionWidget.vue b/client/src/components/ClassSelectionWidget.vue index 999afbfd..672a224f 100644 --- a/client/src/components/ClassSelectionWidget.vue +++ b/client/src/components/ClassSelectionWidget.vue @@ -1,19 +1,21 @@ @@ -111,8 +113,8 @@ line-height: $large-spacing; @include regular-text; color: $color-silver-dark; - } } + } .popover-links__link { cursor: pointer; diff --git a/client/src/pages/joinClass.vue b/client/src/pages/joinClass.vue new file mode 100644 index 00000000..b445fbf1 --- /dev/null +++ b/client/src/pages/joinClass.vue @@ -0,0 +1,9 @@ + diff --git a/client/src/pages/profile.vue b/client/src/pages/profile.vue index 94c32460..9acf1edd 100644 --- a/client/src/pages/profile.vue +++ b/client/src/pages/profile.vue @@ -10,6 +10,9 @@ Profil + Klasse beitreten + diff --git a/client/src/router/index.js b/client/src/router/index.js index c7e7bc6c..430c5378 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -30,6 +30,7 @@ import moduleRoom from '@/pages/moduleRoom' import login from '@/pages/login' import registration from '@/pages/registration' import waitForClass from '@/pages/waitForClass' +import joinClass from '@/pages/joinClass' import store from '@/store/index'; @@ -109,6 +110,7 @@ const routes = [ {path: 'profile', name: 'profile', component: profile, meta: {isProfile: true}}, {path: 'myclasses', name: 'my-classes', component: myClasses, meta: {isProfile: true}}, {path: 'activity', name: 'activity', component: activity, meta: {isProfile: true}}, + {path: 'join-class', name: 'join-class', component: joinClass, meta: {isProfile: true}}, {path: '', name: 'profile-activity', component: activity, meta: {isProfile: true}}, ] },