Skip to content

Commit

Permalink
Upgrades PT6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
karesti committed Jan 20, 2025
1 parent 4e59c59 commit 4211b3c
Show file tree
Hide file tree
Showing 10 changed files with 1,811 additions and 1,402 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
#Adding nashorn libraries to both containers
for containerId in $(docker ps -q)
do
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.6
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-commons:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-tree:9.4
Expand All @@ -69,7 +69,7 @@ jobs:
#Adding nashorn libraries to both containers
for containerId in $(docker ps -q)
do
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.6
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-commons:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-tree:9.4
Expand All @@ -89,7 +89,7 @@ jobs:
#Adding nashorn libraries to both containers
for containerId in $(docker ps -q)
do
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.6
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-commons:9.4
docker exec -i $containerId /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-tree:9.4
Expand All @@ -103,7 +103,7 @@ jobs:
# Wait for server to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/cache-managers/default/health/status > /dev/null
#Installing Nashorn dependencies
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.4
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.6
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.ow2.asm:asm:9.4
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-commons:9.4
docker exec $(docker ps -q -l) /opt/infinispan/bin/cli.sh install org.ow2.asm:asm-tree:9.4
Expand Down
22 changes: 13 additions & 9 deletions cypress/e2e/3_proto-schema.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
describe('Proto Schema CRUD', () => {
const schemaName = 'aTestSchema';
beforeEach(() => {
// Make sure aTestSchema schema does not exist
cy.cleanupTest(Cypress.env('username'), Cypress.env('password'),
'/schemas/' + schemaName + '.proto');
cy.wait(1000);
cy.login(Cypress.env('username'), Cypress.env('password'));
});

Expand Down Expand Up @@ -50,11 +55,11 @@ describe('Proto Schema CRUD', () => {
});

it('successfully creates, edits and deletes a proto schema', () => {
cy.wait(2000); // wait for the delete to be done
clickTabSchemas();

//Creating new schema
cy.get('button[aria-label="create-schema-button"]').click();
const schemaName = 'aTestSchema';
cy.get('#schema-name').click().type(schemaName);
cy.get('#schema').click().type('schemaValue');
cy.get('[data-cy="addSchemaButton"]').click();
Expand All @@ -69,23 +74,22 @@ describe('Proto Schema CRUD', () => {
cy.contains('schemaValue');
cy.contains('Save');
//Artificially adding here some delays between actions so that the proto schema is updated properly and normally shown on the page.
cy.wait(3000);
cy.get('[data-cy=schemaEditArea]').type('{selectall}', { timeout: 10000 });
cy.wait(3000);
cy.wait(1000);
cy.get('[data-cy=schemaEditArea]').type('{selectall}', { timeout: 5000 });
cy.wait(1000);
cy.get('[data-cy=schemaEditArea]').type(
'package org.infinispan; message ExampleProto { optional int32 other_id = 1; }',
{ parseSpecialCharSequences: false }
);
cy.wait(3000);
cy.wait(1000);
cy.get('button[aria-label="confirm-edit-schema-button"]').click();
cy.wait(3000);
cy.contains('Schema ' + schemaName +'.proto updated.');
cy.wait(3000);
cy.wait(1000);
cy.get('[name=close-alert-button]').click(); //Closing alert popup.
//Waiting 5 seconds so that the proto schema is managed to be updated on the page.
cy.wait(3000);
cy.wait(1000);
cy.get('[data-cy="' + schemaName + '.protoConfig"]').click();
cy.wait(3000);
cy.wait(1000);
cy.contains('schemaValue').should('not.exist');
cy.contains('ExampleProto');
cy.contains('Schema ' + schemaName + '.proto has errors').should('not.exist');
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ module.exports = {
transformIgnorePatterns: ['/node_modules/(?!(react-syntax-highlighter)/)'],

// The test environment that will be used for testing.
testEnvironment: "jsdom",
testEnvironment: "jest-fixed-jsdom",
};
Loading

0 comments on commit 4211b3c

Please sign in to comment.