test: removing Protractor (#2601)

Removing obsolete Protractor e2e package and tests

Fixes: WEB-282
This commit is contained in:
Felix van Hove
2025-08-22 21:52:33 -06:00
committed by GitHub
parent 9745643456
commit b9f55aee37
10 changed files with 917 additions and 2439 deletions
-30
View File
@@ -1,30 +0,0 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 60000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
browserName: process.env.PROTRACTOR_BROWSER || 'chrome'
},
// Only works with Chrome and Firefox
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 60000,
print: function () {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
// Better console spec reporter
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
-23
View File
@@ -1,23 +0,0 @@
import { browser, by, element } from 'protractor';
import { LoginPage } from './login.po';
describe('app', () => {
let page: LoginPage;
beforeAll(() => {
page = new LoginPage();
});
it('should display login page', () => {
expect(browser.getCurrentUrl()).toContain('/login');
});
it('should display error with invalid credentials', () => {
page.invalidLogin();
expect(element(by.tagName('mat-error')).isPresent()).toBe(true);
});
it('should login into the app', () => {
page.validLogin();
});
});
-39
View File
@@ -1,39 +0,0 @@
/** Protractor Imports */
import { browser, element, by } from 'protractor';
/**
* Login Page e2e page object
*/
export class LoginPage {
/** username field */
usernameField = element(by.css('input[formControlName="username"]'));
/** password field */
passwordField = element(by.css('input[formControlName="password"]'));
/** login button */
loginButton = element(by.cssContainingText('.login-button', 'Login'));
/** Forces default language */
constructor() {
this.navigateTo();
browser.executeScript(() => localStorage.setItem('language', 'en-US'));
}
/** Navigate to specified url */
navigateTo() {
return browser.get('/');
}
/** Login with correct credentials */
validLogin() {
this.usernameField.sendKeys('mifos');
this.passwordField.sendKeys('password');
this.loginButton.click();
}
/** Login with incorrect credentials */
invalidLogin() {
this.usernameField.sendKeys('test');
this.passwordField.sendKeys('123');
this.loginButton.click();
}
}
-6
View File
@@ -11,17 +11,14 @@ This document provides step-by-step instructions for setting up test automation
## Creating an Account on testRigor
1. **Visit the testRigor website:**
- Go to [testRigor](https://www.testrigor.com/).
2. **Sign up for a new account:**
- Click on the "Sign Up" button on the top right corner.
- Select the "Public Open Source" version.
- Fill in the required details and follow the instructions to complete the registration.
3. **Verify your email and log in:**
- Check your email inbox for a verification email from testRigor.
- Click on the verification link to activate your account.
- Once your account is activated, log in.
@@ -32,7 +29,6 @@ This document provides step-by-step instructions for setting up test automation
## Running Tests with the CLI
1. **Install testRigor CLI:**
- Ensure you have Node.js installed on your machine (version 18 or higher).
- Install the testRigor CLI globally using npm:
```bash
@@ -40,12 +36,10 @@ This document provides step-by-step instructions for setting up test automation
```
2. **Obtain Required Parameters:**
- **Test Suite ID:** You can obtain the Test Suite ID in the URL of your test suite. If the URL is `https://app.testrigor.com/test-suites/12345`, then `12345` is your Test Suite ID.
- **Auth Token:** You can obtain your token from the "CI/CD integration" section on testRigor. Look for "auth-token" and copy the value next to it, which will be in the format `########-####-####-####-############`.
3. **Set Parameters in `run_testrigor_tests.sh`:**
- Before running the tests, create a .env file on the testRigor directory and set the following variables to the parameters you obtained:
- `MIFOS_TEST_SUITE_ID`: Set this variable to your Test Suite ID.
- `MIFOS_AUTH_TOKEN`: Set this variable to your auth token.