Fix flaky onboarding test
This commit is contained in:
parent
7193c08311
commit
61a5a4e35e
|
|
@ -1,5 +1,9 @@
|
||||||
import { assertStartPage } from '../../../support/helpers';
|
import { assertStartPage } from '../../../support/helpers';
|
||||||
|
|
||||||
|
const NewsTeasers = {
|
||||||
|
newsTeasers: [],
|
||||||
|
};
|
||||||
|
|
||||||
describe('Onboarding', () => {
|
describe('Onboarding', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.setup();
|
cy.setup();
|
||||||
|
|
@ -22,17 +26,21 @@ describe('Onboarding', () => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
NewsTeasers: {},
|
NewsTeasers,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.visit('/');
|
cy.visit('/');
|
||||||
assertStartPage(true);
|
assertStartPage(true);
|
||||||
cy.get('[data-cy=onboarding-next-link]').click();
|
cy.get('[data-cy=onboarding-next-link]').click();
|
||||||
|
cy.getByDataCy('onboarding-heading').should('contain.text', 'Ihr Lernbereich');
|
||||||
cy.get('[data-cy=onboarding-next-link]').click();
|
cy.get('[data-cy=onboarding-next-link]').click();
|
||||||
|
cy.getByDataCy('onboarding-heading').should('contain.text', 'Ihr Bereich für Zusammenarbeit');
|
||||||
cy.get('[data-cy=onboarding-next-link]').click();
|
cy.get('[data-cy=onboarding-next-link]').click();
|
||||||
|
cy.getByDataCy('onboarding-heading').should('contain.text', 'Ihr persönlicher Bereich');
|
||||||
cy.get('[data-cy=onboarding-next-link]').click();
|
cy.get('[data-cy=onboarding-next-link]').click();
|
||||||
assertStartPage(false);
|
assertStartPage(false);
|
||||||
|
cy.wait('@NewsTeasers');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows the onboarding steps and skips them', () => {
|
it('shows the onboarding steps and skips them', () => {
|
||||||
|
|
@ -52,7 +60,7 @@ describe('Onboarding', () => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
NewsTeasers: {},
|
NewsTeasers,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -60,6 +68,7 @@ describe('Onboarding', () => {
|
||||||
assertStartPage(true);
|
assertStartPage(true);
|
||||||
cy.getByDataCy('onboarding-skip-link').click();
|
cy.getByDataCy('onboarding-skip-link').click();
|
||||||
assertStartPage(false);
|
assertStartPage(false);
|
||||||
|
cy.wait('@NewsTeasers');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not show the onboarding', () => {
|
it('does not show the onboarding', () => {
|
||||||
|
|
@ -68,10 +77,12 @@ describe('Onboarding', () => {
|
||||||
MeQuery: {
|
MeQuery: {
|
||||||
me: {},
|
me: {},
|
||||||
},
|
},
|
||||||
|
NewsTeasers,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.visit('/');
|
cy.visit('/');
|
||||||
assertStartPage(false);
|
assertStartPage(false);
|
||||||
|
cy.wait('@NewsTeasers');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h3 class="onboarding__page-subheading">Einführung: Schritt 1 von 3</h3>
|
<h3 class="onboarding__page-subheading">Einführung: Schritt 1 von 3</h3>
|
||||||
<h1 class="onboarding__page-heading">Ihr Lernbereich</h1>
|
<h1
|
||||||
|
data-cy="onboarding-heading"
|
||||||
|
class="onboarding__page-heading"
|
||||||
|
>
|
||||||
|
Ihr Lernbereich
|
||||||
|
</h1>
|
||||||
<h2 class="onboarding__heading">
|
<h2 class="onboarding__heading">
|
||||||
{{ $flavor.textTopics }}
|
{{ $flavor.textTopics }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h3 class="onboarding__page-subheading">Einführung: Schritt 2 von 3</h3>
|
<h3 class="onboarding__page-subheading">Einführung: Schritt 2 von 3</h3>
|
||||||
<h1 class="onboarding__page-heading">Ihr Bereich für Zusammenarbeit</h1>
|
<h1
|
||||||
|
data-cy="onboarding-heading"
|
||||||
|
class="onboarding__page-heading"
|
||||||
|
>
|
||||||
|
Ihr Bereich für Zusammenarbeit
|
||||||
|
</h1>
|
||||||
<h2 class="onboarding__heading">Räume</h2>
|
<h2 class="onboarding__heading">Räume</h2>
|
||||||
<p class="onboarding__paragraph">
|
<p class="onboarding__paragraph">
|
||||||
In den Räumen können Sie in grossen und kleinen Gruppen zusammenarbeiten und Beiträge teilen.
|
In den Räumen können Sie in grossen und kleinen Gruppen zusammenarbeiten und Beiträge teilen.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h3 class="onboarding__page-subheading">Einführung: Schritt 3 von 3</h3>
|
<h3 class="onboarding__page-subheading">Einführung: Schritt 3 von 3</h3>
|
||||||
<h1 class="onboarding__page-heading">Ihr persönlicher Bereich</h1>
|
<h1
|
||||||
|
data-cy="onboarding-heading"
|
||||||
|
class="onboarding__page-heading"
|
||||||
|
>
|
||||||
|
Ihr persönlicher Bereich
|
||||||
|
</h1>
|
||||||
<h2 class="onboarding__heading">Portfolio</h2>
|
<h2 class="onboarding__heading">Portfolio</h2>
|
||||||
<p class="onboarding__paragraph">Dokumentieren Sie Ihre Arbeiten und Projekte. Reflektieren Sie Ihr Vorgehen.</p>
|
<p class="onboarding__paragraph">Dokumentieren Sie Ihre Arbeiten und Projekte. Reflektieren Sie Ihr Vorgehen.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue