Skip to content

Code review #76

@halimahexe

Description

@halimahexe

You have a great, informative README, which is easy to follow. And I like the interface of your website - it looks great and works well!

One small thing is that the header is invisible on the pages so the class should be updated to text-black for that element, e.g.
image

The Cypress Edit Question test wasn't working for me as the initialText value was displaying as 'Please choose a category' instead of the existing text 'Science'. I changed this to Science and commented out the code that was trying to grab the initialText and this worked.

Also, very small thing but the name of the test is misleading as it mentions question 30 but you're testing editing question 1.

In spec and add question tests, you access elements using the nth child syntax. It might be easier to instead give the buttons you want to access [data-cy=''] attributes as in the edit question test, e.g. cy.get(':nth-child(16) > .bg-blue-500').select('1066') could be something like cy.get('[data-cy=answer]').select('1066'). This way, if you change the order of elements, your test will still work.

You might also want to add comments to your spec and add question tests to explain what you're doing for future devs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions