Skip to content

Commit

Permalink
Fixed integration tests - updated login via form - closed discojuice …
Browse files Browse the repository at this point in the history
…login. Updated licenses path to `licenses/manage-table`
  • Loading branch information
milanmajchrak committed Jan 3, 2024
1 parent 4e6c290 commit 3874809
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/admin-menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ describe('Admin Menu Page', () => {
cy.get('.sidebar-top-level-items a[href = "/handle-table"]').scrollIntoView().should('be.visible');

// Check licenses redirect url in the <a> tag
cy.get('.sidebar-top-level-items a[href = "/licenses"]').scrollIntoView().should('be.visible');
cy.get('.sidebar-top-level-items a[href = "/licenses/manage-table"]').scrollIntoView().should('be.visible');
});
});
2 changes: 1 addition & 1 deletion cypress/integration/clarin-licenses-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('License Administration Page', () => {
// Login as admin
cy.loginViaForm(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD);

cy.visit('/licenses');
cy.visit('/licenses/manage-table');

// <ds-clarin-license-table> tag must be loaded
cy.get('ds-clarin-license-table').should('exist');
Expand Down
3 changes: 3 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ Cypress.on('uncaught:exception', (err, runnable) => {
* @param password password to login as
*/
function loginViaForm(email: string, password: string): void {
// Cancel discojuice login
cy.wait(500);
cy.get('.discojuice_close').click();
// Enter email
cy.get('ds-log-in [data-test="email"]').type(email);
// Enter password
Expand Down

0 comments on commit 3874809

Please sign in to comment.