mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-25 05:03:48 -05:00
fix(test): seed before Cypress C# tests (#51563)
This commit is contained in:
committed by
GitHub
parent
e769f505b2
commit
e0b609d618
@@ -5,28 +5,33 @@ const cSharpLocations = {
|
||||
'/learn/foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/trophy-write-your-first-code-using-c-sharp'
|
||||
};
|
||||
|
||||
describe('C Sharp Challenges', () => {
|
||||
describe('C Sharp', () => {
|
||||
before(() => {
|
||||
cy.visit(cSharpLocations.challenge);
|
||||
cy.task('seed');
|
||||
});
|
||||
describe('Challenges', () => {
|
||||
before(() => {
|
||||
cy.visit(cSharpLocations.challenge);
|
||||
});
|
||||
|
||||
it('renders the correct buttons', () => {
|
||||
cy.get('.btn-primary').should('have.length', 2);
|
||||
cy.contains('.btn-primary', 'Check your answer').should('be.visible');
|
||||
cy.contains('.btn-primary', 'Ask for Help').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
||||
it('renders the correct buttons', () => {
|
||||
cy.get('.btn-primary').should('have.length', 2);
|
||||
cy.contains('.btn-primary', 'Check your answer').should('be.visible');
|
||||
cy.contains('.btn-primary', 'Ask for Help').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
||||
describe('C Sharp Trophy Challenges', () => {
|
||||
before(() => {
|
||||
cy.login();
|
||||
cy.visit(cSharpLocations.trophy);
|
||||
});
|
||||
|
||||
it('renders the correct buttons', () => {
|
||||
cy.get('.btn-primary').should('have.length', 3);
|
||||
cy.contains('.btn-primary', 'Link Account').should('be.visible');
|
||||
cy.contains('.btn-primary', 'Verify Trophy').should('be.visible');
|
||||
cy.contains('.btn-primary', 'Ask for Help').should('be.visible');
|
||||
describe('Trophy Challenges', () => {
|
||||
before(() => {
|
||||
cy.login();
|
||||
cy.visit(cSharpLocations.trophy);
|
||||
});
|
||||
|
||||
it('renders the correct buttons', () => {
|
||||
cy.get('.btn-primary').should('have.length', 3);
|
||||
cy.contains('.btn-primary', 'Link Account').should('be.visible');
|
||||
cy.contains('.btn-primary', 'Verify Trophy').should('be.visible');
|
||||
cy.contains('.btn-primary', 'Ask for Help').should('be.visible');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user