diff --git a/app/src/components/header/HeaderPart.vue b/app/src/components/header/HeaderPart.vue index 34a4e9f..488698c 100644 --- a/app/src/components/header/HeaderPart.vue +++ b/app/src/components/header/HeaderPart.vue @@ -25,6 +25,7 @@ const toggleMenu = () => { diff --git a/quests/move/answer.sh b/quests/move/answer.sh index 3d7497d..c55e8f2 100644 --- a/quests/move/answer.sh +++ b/quests/move/answer.sh @@ -8,5 +8,4 @@ mv world.txt wow.txt ls mv notes docs ls -echo hint mv docs/hello.txt hi.txt \ No newline at end of file diff --git a/tests/cypress/e2e/UItests.cy.ts b/tests/cypress/e2e/UItests.cy.ts index 031e104..51fee5f 100644 --- a/tests/cypress/e2e/UItests.cy.ts +++ b/tests/cypress/e2e/UItests.cy.ts @@ -5,7 +5,7 @@ export default function checkLoginUI() { describe('example helloworld app', () => { describe('Login tests', () => { beforeEach(() => { - cy.visit('/') + cy.visit('/register') }) it('Check Login Page Elements-Register', () => { checkLoginUI() @@ -83,11 +83,11 @@ describe('example helloworld app', () => { cy.get('#UsernameText') .should('contain', Cypress.env('defaultAccount')) .and('be.visible') + cy.findByRole('link', { name: 'Survey' }).should('be.visible') + cy.findByRole('link', { name: 'LeaderBoard' }).should('be.visible') + cy.findByRole('link', { name: 'Map' }).should('be.visible') cy.findByRole('link', { name: 'Bug Report' }).should('be.visible') cy.findByRole('button', { name: 'Sign Out' }).should('be.visible') - cy.findByRole('button', { name: 'Map' }).should('be.visible') - cy.findByRole('button', { name: 'LeaderBoard' }).should('be.visible') - cy.findByRole('link', { name: 'Survey' }).should('be.visible') }) it('Check QuestInfo', () => { cy.get('#topic').should('contain', title) diff --git a/tests/cypress/support/commands.ts b/tests/cypress/support/commands.ts index 23d6484..dc76e0e 100644 --- a/tests/cypress/support/commands.ts +++ b/tests/cypress/support/commands.ts @@ -8,7 +8,7 @@ declare global { namespace Cypress { interface Chainable { LoginWithPassword(username: string, password: string): Chainable - PrepareForGame(): Chainable + PrepareForGame(questId: string): Chainable InitTerminal(): Chainable typeInCommand(command: string): Chainable getQuestInfo(id: string): Chainable> @@ -38,8 +38,8 @@ Cypress.Commands.add('LoginWithPassword', (username, password) => { cy.get('#password').type(password) cy.get('#LogInOrSignUp').click() }) -Cypress.Commands.add('PrepareForGame', (questId) => { - cy.visit('/') +Cypress.Commands.add('PrepareForGame', (questId: string) => { + cy.visit('/login') // make sure the login page is loaded cy.url().should('satisfy', (elements: string) => { const text = elements @@ -143,9 +143,9 @@ Cypress.Commands.add('CompleteStageWithCommands', (stagename) => { }) Cypress.Commands.add('CheckTextElement', (id, chText, enText) => { if (Cypress.env('isCHVersion')) { - cy.get(id, { timeout: 50000 }).should('contain', chText).and('be.visible') + cy.get(id, { timeout: 7000 }).should('contain', chText).and('be.visible') } else { - cy.get(id, { timeout: 50000 }).should('contain', enText).and('be.visible') + cy.get(id, { timeout: 7000 }).should('contain', enText).and('be.visible') } }) Cypress.Commands.add('CheckPlaceholder', (id, chText, enText) => {